no default tags
This commit is contained in:
parent
4081322b44
commit
6ed0dde5cb
2 changed files with 16 additions and 7 deletions
9
dist/bundle.es.js
vendored
9
dist/bundle.es.js
vendored
File diff suppressed because one or more lines are too long
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue