dillon1000/react
Commit
Browse files Improve component type check in getComponentKey. (#9464)
* Improve component type check in getComponentKey. The sequence ``` component && typeof component === 'object' ``` checks whether component is any JavaScript object except document.all. Since document.all cannot occur here, this can be replaced with the usual ``` typeof component === 'object' && component !== null ``` sequence, which yields true for all JavaScript objects and is well optimized by all JavaScript engines. * Run yarn prettier.
Changed paths1 file
First-parent comparisonsrc/isomorphic/children/traverseAllChildren.js ModifiedPatch
Files changed
Rendering syntax-highlighted changes…