Fix type check for null (#25595)

This commit is contained in:
Sebastian Markbåge
2022-12-03 11:25:05 -05:00
committed by Rick Hanlon
parent 6de70ef00a
commit 76647a4dfd
+1 -1
View File
@@ -287,7 +287,7 @@ function attemptResolveElement(
}
if (__DEV__) {
jsxPropsParents.set(props, type);
if (typeof props.children === 'object') {
if (typeof props.children === 'object' && props.children !== null) {
jsxChildrenParents.set(props.children, type);
}
}