From f56321a93f2b4ed2b92e3003b28dfec2ccda5257 Mon Sep 17 00:00:00 2001 From: Akinwale Ariwodola Date: Fri, 26 Jul 2019 07:45:02 +0100 Subject: [PATCH] ensure that tag names in followedTags are always lowercase --- dist/bundle.es.js | 2 +- src/redux/selectors/tags.js | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/dist/bundle.es.js b/dist/bundle.es.js index b1a0a7f..659d58f 100644 --- a/dist/bundle.es.js +++ b/dist/bundle.es.js @@ -4713,7 +4713,7 @@ const selectKnownTagsByName = reselect.createSelector(selectState$9, state => st const selectFollowedTagsList = reselect.createSelector(selectState$9, state => state.followedTags); -const selectFollowedTags = reselect.createSelector(selectFollowedTagsList, followedTags => followedTags.map(tag => ({ name: tag })).sort((a, b) => a.name.localeCompare(b.name))); +const selectFollowedTags = reselect.createSelector(selectFollowedTagsList, followedTags => followedTags.map(tag => ({ name: tag.toLowerCase() })).sort((a, b) => a.name.localeCompare(b.name))); const selectUnfollowedTags = reselect.createSelector(selectKnownTagsByName, selectFollowedTagsList, (tagsByName, followedTags) => { const followedTagsSet = new Set(followedTags); diff --git a/src/redux/selectors/tags.js b/src/redux/selectors/tags.js index e3bbe4c..d38d375 100644 --- a/src/redux/selectors/tags.js +++ b/src/redux/selectors/tags.js @@ -16,7 +16,7 @@ export const selectFollowedTagsList = createSelector( export const selectFollowedTags = createSelector( selectFollowedTagsList, (followedTags: Array): Array => - followedTags.map(tag => ({ name: tag })).sort((a, b) => a.name.localeCompare(b.name)) + followedTags.map(tag => ({ name: tag.toLowerCase() })).sort((a, b) => a.name.localeCompare(b.name)) ); export const selectUnfollowedTags = createSelector(