Skip to content

Commit

Permalink
fix: ensure window is accesible (#155)
Browse files Browse the repository at this point in the history
* fix: ensure window is accesible

* Update index.js
  • Loading branch information
Kikobeats committed Aug 21, 2019
1 parent 2e24536 commit 1001bd5
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion packages/react/src/utils/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -81,4 +81,4 @@ export const imageProxy = url => {
)}`
}

export const isLazySupported = 'IntersectionObserver' in window
export const isLazySupported = !isNil(window) && !isNil(window.IntersectionObserver)

0 comments on commit 1001bd5

Please sign in to comment.