Skip to content

Commit

Permalink
check that document is also defined in client
Browse files Browse the repository at this point in the history
Signed-off-by: BZ <[email protected]>
  • Loading branch information
atav32 committed Oct 1, 2020
1 parent d961353 commit 99fd166
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion packages/react-div-100vh/src/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -65,5 +65,5 @@ function useWasRenderedOnClientAtLeastOnce() {
}

function isClient() {
return typeof window !== 'undefined'
return typeof window !== 'undefined' && typeof document !== 'undefined'
}

0 comments on commit 99fd166

Please sign in to comment.