@geniussoft/use-hooks
Advanced tools
Comparing version 0.0.9 to 0.0.10
@@ -7,4 +7,7 @@ "use strict"; | ||
try { | ||
const item = window.sessionStorage.getItem(key); | ||
return item ? JSON.parse(item) : initialValue; | ||
if (window !== undefined) { | ||
const item = window.sessionStorage.getItem(key); | ||
return item ? JSON.parse(item) : initialValue; | ||
} | ||
return initialValue; | ||
} | ||
@@ -20,3 +23,5 @@ catch (error) { | ||
setStoredValue(valueToStore); | ||
window.sessionStorage.setItem(key, JSON.stringify(valueToStore)); | ||
if (window !== undefined) { | ||
window.sessionStorage.setItem(key, JSON.stringify(valueToStore)); | ||
} | ||
} | ||
@@ -23,0 +28,0 @@ catch (error) { |
{ | ||
"name": "@geniussoft/use-hooks", | ||
"version": "0.0.9", | ||
"version": "0.0.10", | ||
"description": "Reusable React Hooks from useHooks.com and other online resources", | ||
@@ -26,3 +26,3 @@ "keywords": [ | ||
"devDependencies": { | ||
"@types/react": "^16.9.36", | ||
"@types/react": "^16.9.42", | ||
"@typescript-eslint/eslint-plugin": "^3.2.0", | ||
@@ -37,3 +37,3 @@ "@typescript-eslint/parser": "^3.2.0", | ||
"husky": "^4.2.5", | ||
"lint-staged": "^10.2.10", | ||
"lint-staged": "^10.2.11", | ||
"prettier": "^2.0.5", | ||
@@ -40,0 +40,0 @@ "react": "^16.13.1", |
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
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
9863
15
150