gatsby-react-router-scroll
Advanced tools
Comparing version 1.1.0-alpha.f20ac0ed to 1.1.0-alpha.f5c1df61
{ | ||
"name": "gatsby-react-router-scroll", | ||
"description": "React Router scroll management forked from https://github.com/ytase/react-router-scroll for Gatsby", | ||
"version": "1.1.0-alpha.f20ac0ed", | ||
"version": "1.1.0-alpha.f5c1df61", | ||
"author": "Jimmy Jia", | ||
@@ -6,0 +6,0 @@ "dependencies": { |
@@ -27,3 +27,3 @@ "use strict"; | ||
try { | ||
var value = sessionStorage.getItem(stateKey); | ||
var value = window.sessionStorage.getItem(stateKey); | ||
return JSON.parse(value); | ||
@@ -46,3 +46,3 @@ } catch (e) { | ||
try { | ||
sessionStorage.setItem(stateKey, storedValue); | ||
window.sessionStorage.setItem(stateKey, storedValue); | ||
} catch (e) { | ||
@@ -61,4 +61,3 @@ if (window && window[GATSBY_ROUTER_SCROLL_STATE]) { | ||
SessionStorage.prototype.getStateKey = function getStateKey(location, key) { | ||
var locationKey = location.key; | ||
var stateKeyBase = "" + STATE_KEY_PREFIX + locationKey; | ||
var stateKeyBase = "" + STATE_KEY_PREFIX + location.pathname; | ||
return key === null || typeof key === "undefined" ? stateKeyBase : stateKeyBase + "|" + key; | ||
@@ -65,0 +64,0 @@ }; |
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
12111
222