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:
1 parent
d9a0f9e203
commit
01e2bff1dc
2 files changed
+2
-8
No files matched your search
@@ -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