Skip to content
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

Check children is not null #57

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

kengreeff
Copy link

Javascript believes that null is an object. If children is null, the evaluation of typeof this.props.children === 'object' returns true`.

When evaluating the next line, typeof child.type === 'string' the script crashes because it can't check type of null.

@InsOpDe
Copy link

InsOpDe commented Mar 26, 2021

@noelzubin is there anything holding that PR back? Because the current master breaks things

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