diff --git a/packages/react-reconciler/src/ReactFiberHooks.new.js b/packages/react-reconciler/src/ReactFiberHooks.new.js index 1008f835b6e77..b7799d1dedccc 100644 --- a/packages/react-reconciler/src/ReactFiberHooks.new.js +++ b/packages/react-reconciler/src/ReactFiberHooks.new.js @@ -1624,10 +1624,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 139e869224223..03360bd6e96ce 100644 --- a/packages/react-reconciler/src/ReactFiberHooks.old.js +++ b/packages/react-reconciler/src/ReactFiberHooks.old.js @@ -1624,10 +1624,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' +