no default tags

This commit is contained in:
jessop 2020-03-16 16:29:52 -04:00
parent 4081322b44
commit 6ed0dde5cb
2 changed files with 16 additions and 7 deletions

9
dist/bundle.es.js vendored

File diff suppressed because one or more lines are too long

View file

@ -14,7 +14,7 @@ function getDefaultKnownTags() {
}
const defaultState: TagState = {
followedTags: DEFAULT_FOLLOWED_TAGS,
followedTags: [],
knownTags: getDefaultKnownTags(),
};
@ -70,10 +70,16 @@ export const tagsReducer = handleActions(
action: { data: { tags: ?Array<string> } }
) => {
const { tags } = action.data;
if (Array.isArray(tags)) {
return {
...state,
followedTags: tags && tags.length ? tags : DEFAULT_FOLLOWED_TAGS,
followedTags: tags,
};
}
return {
...state,
};
},
},
defaultState