diff --git a/src/redux/reducers/columns.ts b/src/redux/reducers/columns.ts index 64b11889..c9767077 100644 --- a/src/redux/reducers/columns.ts +++ b/src/redux/reducers/columns.ts @@ -17,7 +17,7 @@ export const columnsReducer: Reducer = ( switch (action.type) { case REHYDRATE as any: return immer(state, draft => { - const columns = columnsSelector(action.payload as any) + const columns = columnsSelector((action.payload as any) || {}) draft.columns = columns || [] draft.columns = draft.columns.filter(c => c && c.id) diff --git a/src/redux/selectors/auth.ts b/src/redux/selectors/auth.ts index 77a7aebf..3f93f752 100644 --- a/src/redux/selectors/auth.ts +++ b/src/redux/selectors/auth.ts @@ -1,6 +1,6 @@ import { RootState } from '../../types' -const s = (state: RootState) => state.auth +const s = (state: RootState) => state.auth || {} export const errorSelector = (state: RootState) => s(state).error diff --git a/src/redux/selectors/columns.ts b/src/redux/selectors/columns.ts index f60ff69d..7cc451f2 100644 --- a/src/redux/selectors/columns.ts +++ b/src/redux/selectors/columns.ts @@ -1,5 +1,5 @@ import { RootState } from '../../types' -const s = (state: RootState) => state.columns +const s = (state: RootState) => state.columns || {} export const columnsSelector = (state: RootState) => s(state).columns diff --git a/src/redux/selectors/config.ts b/src/redux/selectors/config.ts index 552db66e..0280e6b7 100644 --- a/src/redux/selectors/config.ts +++ b/src/redux/selectors/config.ts @@ -4,7 +4,7 @@ import { loadTheme } from '../../styles/utils' import { RootState } from '../../types' import { isNight } from '../../utils/helpers/shared' -const s = (state: RootState) => state.config +const s = (state: RootState) => state.config || {} export const themePairSelector = (state: RootState) => s(state).theme diff --git a/src/redux/selectors/navigation.ts b/src/redux/selectors/navigation.ts index e8c463c2..3f657504 100644 --- a/src/redux/selectors/navigation.ts +++ b/src/redux/selectors/navigation.ts @@ -1,6 +1,6 @@ import { RootState } from '../../types' -const s = (state: RootState) => state.navigation +const s = (state: RootState) => state.navigation || {} export const modalStack = (state: RootState) => s(state).modalStack