@noriginmedia/react-spatial-navigation
Advanced tools
Comparing version 2.12.6 to 2.12.7
@@ -7,2 +7,6 @@ # Changelog | ||
## [2.12.7] | ||
### Added | ||
- SSR support, additional checks for `window` object to avoid errors on SSR environments. | ||
## [2.12.6] | ||
@@ -9,0 +13,0 @@ ### Added |
@@ -463,3 +463,3 @@ 'use strict'; | ||
// We check both because the React Native remote debugger implements window, but not window.addEventListener. | ||
if (window && window.addEventListener) { | ||
if (typeof window !== 'undefined' && window.addEventListener) { | ||
this.keyDownEventListener = function (event) { | ||
@@ -529,3 +529,3 @@ if (_this3.paused === true) { | ||
// We check both because the React Native remote debugger implements window, but not window.removeEventListener. | ||
if (window && window.removeEventListener) { | ||
if (typeof window !== 'undefined' && window.removeEventListener) { | ||
window.removeEventListener('keydown', this.keyDownEventListener); | ||
@@ -532,0 +532,0 @@ this.keyDownEventListener = null; |
@@ -12,3 +12,3 @@ 'use strict'; | ||
// We'll make VisualDebugger no-op for any environments lacking a DOM (e.g. SSR and React Native non-web platforms). | ||
var hasDOM = window && window.document; | ||
var hasDOM = typeof window !== 'undefined' && window.document; | ||
@@ -15,0 +15,0 @@ var WIDTH = hasDOM ? window.innerWidth : 0; |
{ | ||
"name": "@noriginmedia/react-spatial-navigation", | ||
"version": "2.12.6", | ||
"version": "2.12.7", | ||
"description": "HOC-based Spatial Navigation (key navigation) solution for React", | ||
@@ -5,0 +5,0 @@ "main": "dist/index.js", |
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
108672