redux-state-sync
Advanced tools
Comparing version 0.0.3 to 0.0.4
@@ -36,5 +36,9 @@ 'use strict'; | ||
if (action && !action.$time) { | ||
var stampedAction = timestampAction(action); | ||
lastTimeStamp = stampedAction.$time; | ||
localStorage.setItem(LAST_ACTION, JSON.stringify(stampedAction)); | ||
try { | ||
var stampedAction = timestampAction(action); | ||
lastTimeStamp = stampedAction.$time; | ||
localStorage.setItem(LAST_ACTION, JSON.stringify(stampedAction)); | ||
} catch (e) { | ||
console.log("Your browser doesn't support localStorage"); | ||
} | ||
} | ||
@@ -41,0 +45,0 @@ return next(action); |
{ | ||
"name": "redux-state-sync", | ||
"version": "0.0.3", | ||
"version": "0.0.4", | ||
"description": "A middleware for redux to sync state in different tabs", | ||
@@ -10,3 +10,6 @@ "main": "dist/syncStorage.js", | ||
"prebuild": "rimraf dist", | ||
"build": "babel --copy-files --out-dir dist --ignore *.test.js src", | ||
"build": "npm-run-all --parallel build:*", | ||
"build:main": "babel --copy-files --out-dir dist --ignore *.test.js src", | ||
"build:umd": "webpack --output-filename syncStorage.umd.js", | ||
"build:umd.min": "webpack --output-filename syncStorage.umd.min.js -p", | ||
"semantic-release": "semantic-release pre && npm publish && semantic-release post" | ||
@@ -36,2 +39,3 @@ }, | ||
"babel-jest": "^16.0.0", | ||
"babel-loader": "^7.0.0", | ||
"babel-polyfill": "^6.16.0", | ||
@@ -48,4 +52,6 @@ "babel-preset-es2015": "^6.18.0", | ||
"jest": "^16.0.2", | ||
"npm-run-all": "^4.0.2", | ||
"rimraf": "^2.5.4", | ||
"semantic-release": "^4.3.5" | ||
"semantic-release": "^6.3.2", | ||
"webpack": "^2.4.1" | ||
}, | ||
@@ -52,0 +58,0 @@ "dependencies": { |
@@ -18,5 +18,9 @@ import indexOf from 'lodash/indexOf'; | ||
if (action && !action.$time) { | ||
const stampedAction = timestampAction(action); | ||
lastTimeStamp = stampedAction.$time; | ||
localStorage.setItem(LAST_ACTION, JSON.stringify(stampedAction)); | ||
try { | ||
const stampedAction = timestampAction(action); | ||
lastTimeStamp = stampedAction.$time; | ||
localStorage.setItem(LAST_ACTION, JSON.stringify(stampedAction)); | ||
} catch (e) { | ||
console.log("Your browser doesn't support localStorage"); | ||
} | ||
} | ||
@@ -23,0 +27,0 @@ return next(action); |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
254812
15
1872
18
1