Skip to content

add check for prototype instanceof in case === fails #58

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

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

samlecuyer
Copy link

I'm using this component in with react ^16.3.1 and it works fine. However, when I embed it in an app that uses next.js, the equality check on the children fails. In this case, we should check to see if it's an instanceof.

Sometimes the equality check fails, but the prototype check succeeds.
@leonid-shevtsov
Copy link

+1 had the same issue with React 16.6 (and no next.js) and this PR fixed it.

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