Skip to content

Check children is not null#57

Open
kengreeff wants to merge 1 commit into
rnosov:masterfrom
kengreeff:check-children-existence
Open

Check children is not null#57
kengreeff wants to merge 1 commit into
rnosov:masterfrom
kengreeff:check-children-existence

Conversation

@kengreeff
Copy link
Copy Markdown

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
Copy Markdown

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