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

Make correct output for number children in debug #149

Merged
merged 1 commit into from
Jan 30, 2016

Conversation

roadhump
Copy link
Contributor

Now we have strange <undefined /> tag instead of child of number type. This PR should fix it.

@@ -44,7 +44,7 @@ function propsString(node) {

export function debugNode(node, indentLength = 2) {
if (!node) return '';
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

While i'm looking at this, it seems like this should be

if (!node && node !== 0) return '';

Since react will stringify 0 to '0'

@lelandrichardson
Copy link
Collaborator

This looks good to me. Mind implementing my one comment + corresponding test for bonus points??? 😃

@lelandrichardson
Copy link
Collaborator

Thanks for contributing, btw!

@roadhump
Copy link
Contributor Author

@lelandrichardson Fixed issue with zero, thank you

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants