Skip to content

Commit 2733707

Browse files
author
Nicole Levy
committed
better check
1 parent 34816fc commit 2733707

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

packages/react/src/ReactElement.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -293,7 +293,7 @@ export function cloneAndReplaceKey(oldElement, newKey) {
293293
*/
294294
export function cloneElement(element, config, children) {
295295
invariant(
296-
!(element === null || element === undefined),
296+
element != null,
297297
'Cannot clone a null or undefined element.'
298298
);
299299

0 commit comments

Comments
 (0)