-
Notifications
You must be signed in to change notification settings - Fork 5
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
There is a crash if one of the children element is null
#18
Comments
Is there a specific function in the lib that you can point me to that has this issue? |
Hello! I came to this issue since I ran into it as well. I was using the |
FWIW, if I remove the filter part of this line from the tests and add a test case like Can you explain why https://github.com/TheSpicyMeatball/react-nanny/blob/main/src/getChildByType/index.deep.test.js#L31 is added to the tests and not something we handle in the src? |
I took a stab at correcting this here. Please let me know what you think! |
@TheSpicyMeatball not sure if you got notified of this since it's a closed issue, thanks! |
In case anyone else stumbles upon this issue, our team has decided to use react-children-utilities instead. It supports our needs, has more stars, has more downloads, is smaller, and supports React 15 - 18. |
If React markup has a child under the condition
the result children will be
[element, null]
and that will crash the lib.The text was updated successfully, but these errors were encountered: