Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix useOrientation on SSR #1870

Merged
merged 5 commits into from
Mar 10, 2021
Merged

Fix useOrientation on SSR #1870

merged 5 commits into from
Mar 10, 2021

Conversation

kodai3
Copy link
Contributor

@kodai3 kodai3 commented Mar 9, 2021

Description

When using useOrientation in an SSR app it causes the error window is undefined to be thrown.

I took over from #1569
Fixes #1570

also noticed that useOrientation is listed here #947, but no eslint-disable in the file.

Type of change

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as before)

Checklist

  • Read the Contributing Guide
  • Perform a code self-review
  • Comment the code, particularly in hard-to-understand areas
  • Add documentation
  • Add hook's story at Storybook
  • Cover changes with tests
  • Ensure the test suite passes (yarn test)
  • Provide 100% tests coverage
  • Make sure code lints (yarn lint). Fix it with yarn lint:fix in case of failure.
  • Make sure types are fine (yarn lint:types).

@xobotyi xobotyi merged commit e2ccb62 into streamich:master Mar 10, 2021
@streamich
Copy link
Owner

🎉 This PR is included in version 17.2.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

useOrientation is not SSR safe
3 participants