Skip to content
This repository has been archived by the owner on Jun 26, 2020. It is now read-only.

babel-node: ReactComponentTreeDevtool.js causes ReactDOMServer.renderToString to fail #403

Closed
ian-speers opened this issue Jul 24, 2016 · 2 comments

Comments

@ian-speers
Copy link

While following a server-side react tutorial, I encountered a runtime error caused by ReactComponentTreeDevtool. Specifically, the purgeDeep function seems to be problematic under certain conditions (ReactComponentTreeDevtool.js line 47):

User Code:

screen shot 2016-07-24 at 3 49 40 pm

screen shot 2016-07-24 at 3 47 01 pm

Stack Trace:

screen shot 2016-07-24 at 3 41 00 pm

Offending Code:

screen shot 2016-07-24 at 3 47 40 pm

Resolution: Adding a check for undefined childIDs before the traversal seems to resolve the issue (see below).

screen shot 2016-07-24 at 3 50 54 pm

screen shot 2016-07-24 at 4 02 23 pm

Additional:
OS: OS X Yosemite (10.10.5)
Node: 4.4.7
Run on: babel-node (via babel-cli 6.11.4 )

Let me know if there's any additional information I should provide (e.g. dev dependencies). Thanks!

@sophiebits
Copy link
Contributor

Despite the name, this error is actually part of React proper, not the devtools repo. Do you mind re-filing at https://github.com/facebook/react?

@ian-speers
Copy link
Author

Sure thing. Link

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

No branches or pull requests

2 participants