diff --git a/ui/component/claimListDiscover/index.js b/ui/component/claimListDiscover/index.js index e483f37ff..a9b6d34f6 100644 --- a/ui/component/claimListDiscover/index.js +++ b/ui/component/claimListDiscover/index.js @@ -19,7 +19,7 @@ const select = state => ({ loading: selectFetchingClaimSearch(state), showNsfw: makeSelectClientSetting(SETTINGS.SHOW_MATURE)(state), hideReposts: makeSelectClientSetting(SETTINGS.HIDE_REPOSTS)(state), - language: selectLanguage(state), + languageSetting: selectLanguage(state), hiddenUris: selectBlockedChannels(state), searchInLanguage: makeSelectClientSetting(SETTINGS.SEARCH_IN_LANGUAGE)(state), }); diff --git a/ui/redux/selectors/settings.js b/ui/redux/selectors/settings.js index 204756ded..fe9657048 100644 --- a/ui/redux/selectors/settings.js +++ b/ui/redux/selectors/settings.js @@ -55,7 +55,7 @@ export const selectThemePath = createSelector( ); export const selectHomepageCode = createSelector(makeSelectClientSetting(SETTINGS.HOMEPAGE), setting => { - return setting || getDefaultHomepage(); + return homepages[setting] ? setting : getDefaultHomepage(); }); export const selectLanguage = createSelector(makeSelectClientSetting(SETTINGS.LANGUAGE), setting => { @@ -67,11 +67,7 @@ export const selectHomepageData = createSelector( selectHomepageCode, homepageCode => { // homepages = { 'en': homepageFile, ... } - if (!homepageCode || !homepages[homepageCode]) { - return getDefaultHomepage(); - } else { - return homepages[homepageCode]; - } + return homepages[homepageCode]; } );