Skip to content

Commit

Permalink
fix: Extra null check since typeof null = object, however null.locati…
Browse files Browse the repository at this point in the history
…on throws an error
  • Loading branch information
christemple committed Feb 1, 2018
1 parent 992ebe7 commit 9f492ab
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 9f492ab

Please sign in to comment.