dillon1000/react

Commit

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.
Browse files
Changed paths1 file
First-parent comparison
M src/isomorphic/children/traverseAllChildren.js Modified
Patch

Files changed

Rendering syntax-highlighted changes…