Skip to content

Conversation

@stephenwf
Copy link
Contributor

Server side rendering causes an error when rendering a component using this hook when it looks for navigator. Added checks for navigator and window to avoid the look up.

Server side rendering causes an error when rendering a component using this hook when it looks for `navigator`. Added checks for `navigator` and `window` to avoid the look up.
@stephenwf stephenwf marked this pull request as draft May 19, 2020 14:02
@stephenwf stephenwf marked this pull request as ready for review May 19, 2020 14:10
Copy link
Owner

@based-ghost based-ghost left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good, I hadn't considered the SSR use-case. Also thanks for including a unit test with the changes.

@based-ghost based-ghost merged commit 40998a4 into based-ghost:master May 20, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants