-
Notifications
You must be signed in to change notification settings - Fork 34
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
Issue with multiple children #9
Comments
Hey @grxy Awesome, thanks so much for picking this up. I'll try review and merge within the next 24 hours. 👍 |
@ctrlplusb No prob, dude. I actually noticed the issue when writing unit tests for my code while using this. P.S. Great work breaking it out from react-apollo! |
Hi @grxy 👋 Apologies for the late one on this. I have struggled to recreate your initial issue. I have added another branch containing a test that I was initially expecting to fail as it doesn't have your fix applied. The test passes though. Do you mind having a look to see if I have configured the test correctly? Thanks! |
@ctrlplusb The issue happens when you have multiple react components that are siblings, so if you updated your tree to be: const tree = (
<OnlyChildren something={1}>
<OnlyChildren something={2}>
<div>Hello world!</div>
</OnlyChildren>
<OnlyChildren something={3}>
<div>Hello world!</div>
</OnlyChildren>
</OnlyChildren>
) you would expect actual to be |
Perfect thanks! |
@ctrlplusb Any chance you'll be able to merge my PR and publish 2.1.2 soon? |
Fix issue with nested children, update unit tests, close #9
All done and published. Thanks for being persistent with me! |
@ctrlplusb Great! Thank you! |
I ran into the following problem where not all nested children would be visited:
This works
So does this
This does not work
Because there are no basic HTML elements wrapping the children of A, those individual children are not visited
A PR will follow shortly and should provide a fix for this issue.
The text was updated successfully, but these errors were encountered: