ngrx-store-localstorage
Advanced tools
Comparing version 0.3.0 to 5.0.0
@@ -5,2 +5,3 @@ "use strict"; | ||
var INIT_ACTION = '@ngrx/store/init'; | ||
var UPDATE_ACTION = '@ngrx/store/update-reducers'; | ||
var detectDate = /(\d{4})-(\d{2})-(\d{2})T(\d{2}):(\d{2}):(\d{2})/; | ||
@@ -179,3 +180,4 @@ // correctly parse dates from local storage | ||
*/ | ||
if (action.type === INIT_ACTION && rehydratedState) { | ||
if ((action.type === INIT_ACTION || action.type === UPDATE_ACTION) && | ||
rehydratedState) { | ||
state = Object.assign({}, state, rehydratedState); | ||
@@ -182,0 +184,0 @@ } |
{ | ||
"name": "ngrx-store-localstorage", | ||
"version": "0.3.0", | ||
"version": "5.0.0", | ||
"description": "State and local storage syncing for @ngrx/store", | ||
@@ -29,3 +29,3 @@ "main": "./dist/index.js", | ||
"peerDependencies": { | ||
"@ngrx/store": "^4.0.0" | ||
"@ngrx/store": "^4.0.0 || ^5.0.0" | ||
}, | ||
@@ -35,3 +35,3 @@ "devDependencies": { | ||
"@ngrx/core": "^1.2.0", | ||
"@ngrx/store": "^2.2.1", | ||
"@ngrx/store": "^5.0.0", | ||
"@types/core-js": "^0.9.35", | ||
@@ -38,0 +38,0 @@ "@types/crypto-js": "^3.1.33", |
const INIT_ACTION = '@ngrx/store/init'; | ||
const UPDATE_ACTION = '@ngrx/store/update-reducers'; | ||
const detectDate = /(\d{4})-(\d{2})-(\d{2})T(\d{2}):(\d{2}):(\d{2})/; | ||
@@ -230,3 +231,6 @@ | ||
*/ | ||
if (action.type === INIT_ACTION && rehydratedState) { | ||
if ( | ||
(action.type === INIT_ACTION || action.type === UPDATE_ACTION) && | ||
rehydratedState | ||
) { | ||
state = Object.assign({}, state, rehydratedState); | ||
@@ -233,0 +237,0 @@ } |
Sorry, the diff of this file is not supported yet
No v1
QualityPackage is not semver >=1. This means it is not stable and does not support ^ ranges.
Found 1 instance in 1 package
53672
17
867
0