Skip to content

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

Open
samlecuyer wants to merge 2 commits intotakempf:masterfrom
samlecuyer:master
Open

add check for prototype instanceof in case === fails#58
samlecuyer wants to merge 2 commits intotakempf:masterfrom
samlecuyer:master

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