Skip to content

Commit

Permalink
fix(persist-state): should support non-localstorage envs
Browse files Browse the repository at this point in the history
  • Loading branch information
Netanel Basal committed May 30, 2019
1 parent 361a4ca commit 3b7e160
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion akita/src/persistState.ts
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ export function persistState(params?: Partial<PersistStateParams>) {

const defaults: PersistStateParams = {
key: 'AkitaStores',
storage: localStorage,
storage: typeof localStorage === 'undefined' ? params.storage : localStorage,
deserialize: JSON.parse,
serialize: JSON.stringify,
include: [],
Expand Down

0 comments on commit 3b7e160

Please sign in to comment.