-
-
Notifications
You must be signed in to change notification settings - Fork 1k
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
Check if ResizeObserver is defined instead of checking window object #2222
Conversation
This pull request is automatically built and testable in CodeSandbox. To see build info of the built libraries, click here or the icon next to each commit SHA. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
@andriuss, I think you forgot to run prettier. |
Thanks! I did run packages-lint-fix now. |
The build looks good now? |
ResizeObserver is not implemented in all environments, for example, jsdom.
This forces nivo library consumers to mock or add polyfils, for example jest.setup.js.
Checking for global ResizeObserver removes the need to have it on the global window object.