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

Check if ResizeObserver is defined instead of checking window object #2222

Merged
merged 2 commits into from
Feb 26, 2023

Conversation

andriuss
Copy link
Contributor

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.

@codesandbox-ci
Copy link

codesandbox-ci bot commented Jan 23, 2023

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.

Copy link
Owner

@plouc plouc left a comment

Choose a reason for hiding this comment

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

LGTM

@plouc
Copy link
Owner

plouc commented Jan 23, 2023

@andriuss, I think you forgot to run prettier.

@andriuss
Copy link
Contributor Author

@andriuss, I think you forgot to run prettier.

Thanks! I did run packages-lint-fix now.

@andriuss
Copy link
Contributor Author

The build looks good now?

@joaopedromatias
Copy link
Contributor

:shipit:

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.

3 participants