diff --git a/ui/redux/actions/comments.js b/ui/redux/actions/comments.js index 053e8eab1..a28560656 100644 --- a/ui/redux/actions/comments.js +++ b/ui/redux/actions/comments.js @@ -1390,7 +1390,9 @@ export const doFetchCreatorSettings = (channelClaimIds: Array = []) => { const channelId = channelSignatures[i].claim_id; settingsByChannelId[channelId] = settings[i]; - settingsByChannelId[channelId].words = settingsByChannelId[channelId].words.split(','); + if (settings[i].words) { + settingsByChannelId[channelId].words = settings[i].words.split(','); + } delete settingsByChannelId[channelId].channel_name; delete settingsByChannelId[channelId].channel_id; diff --git a/ui/redux/reducers/comments.js b/ui/redux/reducers/comments.js index 6c09339f3..c81725a1e 100644 --- a/ui/redux/reducers/comments.js +++ b/ui/redux/reducers/comments.js @@ -986,6 +986,11 @@ export default handleActions( fetchingSettings: false, }), [ACTIONS.COMMENT_FETCH_SETTINGS_COMPLETED]: (state: CommentsState, action: any) => { + // TODO: This is incorrect, as it could make 'settingsByChannelId' store + // only 1 channel with other channel's data purged. It works for now + // because the GUI only shows 1 channel's setting at a time, and *always* + // re-fetches to get latest data before displaying. Either rename this to + // 'activeChannelCreatorSettings', or append the new data properly. return { ...state, settingsByChannelId: action.data,