Skip to content

Commit 165a619

Browse files
ashbrowningAljullu
authored andcommitted
fix(intersectionObs): guarding against undefined window (#26)
1 parent 73b7353 commit 165a619

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

src/utils/intersection-observer.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
export default function() {
22
return (
3+
typeof window !== 'undefined' &&
34
'IntersectionObserver' in window &&
45
'isIntersecting' in window.IntersectionObserverEntry.prototype
56
);

0 commit comments

Comments
 (0)