mirror of
https://github.com/facebook/react.git
synced 2025-11-01 09:12:30 +00:00
Remove unnecessary check (#24332)
This commit is contained in:
@@ -1624,10 +1624,7 @@ function mountRef<T>(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' +
|
||||
|
||||
@@ -1624,10 +1624,7 @@ function mountRef<T>(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' +
|
||||
|
||||
Reference in New Issue
Block a user