You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When using this module through node.js, some of the checks for window do fail. The reason is that checking the existence of a global window object cannot be done via if (window), because if window does not exist, it will throw an error. Instead, you should check for window existence via if (typeof window === 'object'), which will not throw.
I'm happy to create a PR if you like.
The text was updated successfully, but these errors were encountered:
mofux
changed the title
window is not a function
window is not defined
Oct 12, 2017
When using this module through node.js, some of the checks for window do fail. The reason is that checking the existence of a global window object cannot be done via
if (window)
, because if window does not exist, it will throw an error. Instead, you should check for window existence viaif (typeof window === 'object')
, which will not throw.I'm happy to create a PR if you like.
The text was updated successfully, but these errors were encountered: