diff --git a/packages/react-reconciler/src/ReactFiberHooks.new.js b/packages/react-reconciler/src/ReactFiberHooks.new.js index d1c50b42d8cbc..6a32503833385 100644 --- a/packages/react-reconciler/src/ReactFiberHooks.new.js +++ b/packages/react-reconciler/src/ReactFiberHooks.new.js @@ -1622,10 +1622,7 @@ function mountRef(initialValue: T): {|current: T|} { }, set current(value) { if (currentlyRenderingFiber !== null && !didWarnAboutWrite) { - if ( - hasBeenInitialized || - (!hasBeenInitialized && !didCheckForLazyInit) - ) { + if (hasBeenInitialized || !didCheckForLazyInit) { didWarnAboutWrite = true; console.warn( '%s: Unsafe write of a mutable value during render.\n\n' + diff --git a/packages/react-reconciler/src/ReactFiberHooks.old.js b/packages/react-reconciler/src/ReactFiberHooks.old.js index 137ee33cba512..5f2887c76d22c 100644 --- a/packages/react-reconciler/src/ReactFiberHooks.old.js +++ b/packages/react-reconciler/src/ReactFiberHooks.old.js @@ -1622,10 +1622,7 @@ function mountRef(initialValue: T): {|current: T|} { }, set current(value) { if (currentlyRenderingFiber !== null && !didWarnAboutWrite) { - if ( - hasBeenInitialized || - (!hasBeenInitialized && !didCheckForLazyInit) - ) { + if (hasBeenInitialized || !didCheckForLazyInit) { didWarnAboutWrite = true; console.warn( '%s: Unsafe write of a mutable value during render.\n\n' +