diff --git a/projects/lib/src/lib/index.ts b/projects/lib/src/lib/index.ts index 3e730bb..a37515b 100644 --- a/projects/lib/src/lib/index.ts +++ b/projects/lib/src/lib/index.ts @@ -269,7 +269,7 @@ export const localStorageSync = (config: LocalStorageConfig) => (reducer: any) = // If state arrives undefined, we need to let it through the supplied reducer // in order to get a complete state as defined by user - if (action.type === INIT_ACTION && !state) { + if ((action.type === INIT_ACTION || action.type === UPDATE_ACTION) && !state) { nextState = reducer(state, action); } else { nextState = { ...state };