Skip to content

Make the MutationObserver of ResizeSensor compatible with new Chrome version #249

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

Merged
merged 1 commit into from
Nov 9, 2018

Conversation

alubbe
Copy link
Contributor

@alubbe alubbe commented Nov 9, 2018

The for-in loop over the NodeList now goes through the prototype chain, so we check hasOwnProperty first.

Otherwise, we get this cryptic error:

Uncaught TypeError: Cannot read property 'length' of undefined
    at MutationObserver.<anonymous> (ResizeSensor.js:282)

…version

The for-in loop over the `NodeList` now goes through the prototype chain, so we check `hasOwnProperty` first
@marcj marcj merged commit 09d4cf1 into marcj:master Nov 9, 2018
@marcj
Copy link
Owner

marcj commented Nov 9, 2018

Thanks!

@alubbe
Copy link
Contributor Author

alubbe commented Nov 9, 2018

holy cow you are fast. any chance you could publish this onto npm? My current PR is blocked because our browser tests are failing due to this bug

@marcj
Copy link
Owner

marcj commented Nov 9, 2018

@alubbe
Copy link
Contributor Author

alubbe commented Nov 9, 2018

I love you - thanks for the insane response times, you put APIs to shame ;)

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