diff --git a/packages/react-reconciler/src/ReactFiberWorkLoop.js b/packages/react-reconciler/src/ReactFiberWorkLoop.js index ed39e89e5c9cf..35679634cd3de 100644 --- a/packages/react-reconciler/src/ReactFiberWorkLoop.js +++ b/packages/react-reconciler/src/ReactFiberWorkLoop.js @@ -1034,7 +1034,11 @@ function renderRoot( hasNotProcessedNewUpdates && !isSync && // do not delay if we're inside an act() scope - !(flushSuspenseFallbacksInTests && IsThisRendererActing.current) + !( + __DEV__ && + flushSuspenseFallbacksInTests && + IsThisRendererActing.current + ) ) { // If we have not processed any new updates during this pass, then this is // either a retry of an existing fallback state or a hidden tree. @@ -1075,7 +1079,11 @@ function renderRoot( if ( !isSync && // do not delay if we're inside an act() scope - !(flushSuspenseFallbacksInTests && IsThisRendererActing.current) + !( + __DEV__ && + flushSuspenseFallbacksInTests && + IsThisRendererActing.current + ) ) { // We're suspended in a state that should be avoided. We'll try to avoid committing // it for as long as the timeouts let us. @@ -1148,7 +1156,11 @@ function renderRoot( if ( !isSync && // do not delay if we're inside an act() scope - !(flushSuspenseFallbacksInTests && IsThisRendererActing.current) && + !( + __DEV__ && + flushSuspenseFallbacksInTests && + IsThisRendererActing.current + ) && workInProgressRootLatestProcessedExpirationTime !== Sync && workInProgressRootCanSuspendUsingConfig !== null ) {