Skip to content

Commit

Permalink
Merge pull request #135 from christemple/window-exists-null-fix
Browse files Browse the repository at this point in the history
Better check for the existence of window
  • Loading branch information
meeber authored Feb 1, 2018
2 parents 992ebe7 + 9f492ab commit a40d839
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion index.js
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@ export default function typeDetect(obj) {

// Not caching existence of `window` and related properties due to potential
// for `window` to be unset before tests in quasi-browser environments.
if (typeof window === 'object') {
if (typeof window === 'object' && window !== null) {
/* ! Spec Conformance
* (https://html.spec.whatwg.org/multipage/browsers.html#location)
* WhatWG HTML$7.7.3 - The `Location` interface
Expand Down

0 comments on commit a40d839

Please sign in to comment.