We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 2e982b9 commit 892dd52Copy full SHA for 892dd52
src/isomorphic/children/ReactChildren.js
@@ -49,7 +49,9 @@ var didWarnAboutMaps = false;
49
function getComponentKey(component, index) {
50
// Do some typechecking here since we call this blindly. We want to ensure
51
// that we don't block potential future ES APIs.
52
- if (component && typeof component === 'object' && component.key != null) {
+ if (
53
+ typeof component === 'object' && component !== null && component.key != null
54
+ ) {
55
// Explicit key
56
return KeyEscapeUtils.escape(component.key);
57
}
0 commit comments