Skip to content

Commit 74a8ca7

Browse files
authored
Merge pull request #60 from cedricdelpoux/patch-1
Supports SSR
2 parents 288369d + 92a89a0 commit 74a8ca7

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/Scrollama.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ class Scrollama extends Component {
2727
// stores step elements by id
2828
stepElIds = [];
2929

30-
viewH = window.innerHeight;
30+
viewH = typeof window !== undefined ? window.innerHeight : 0;
3131
pageH = 0;
3232
offsetVal = 0;
3333
offsetMargin = 0;

0 commit comments

Comments
 (0)