dillon1000/react
Commit
Browse files Improve `findComponentRoot` Error Message
Instead of simply logging the React ID of the `ancestorNode` when `findComponentRoot` fails, use a `try ... finally` to `console.error` the `ancestorNode`. This allows modern web inspectors to actually log a reference to the node (which may not have a React ID).
This means when people run into the problem, they will not have to execute:
require('ReactID').getNode(<copy+paste>);
NOTE: Admittedly, this will not log anything in IE8. That's fine, since IE8 has shitty console logging anyway.Changed paths2 files
First-parent comparisonsrc/core/ReactInstanceHandles.js ModifiedM src/core/__tests__/ReactInstanceHandles-test.js ModifiedPatch
Files changed
Rendering syntax-highlighted changes…