File tree Expand file tree Collapse file tree 2 files changed +9
-3
lines changed
packages/react-reconciler/src Expand file tree Collapse file tree 2 files changed +9
-3
lines changed Original file line number Diff line number Diff line change @@ -23,6 +23,8 @@ import {
23
23
markRootEntangled ,
24
24
mergeLanes ,
25
25
claimNextTransitionLane ,
26
+ includesSomeLane ,
27
+ UpdateLanes ,
26
28
} from './ReactFiberLane' ;
27
29
import {
28
30
CommitContext ,
@@ -232,6 +234,10 @@ function flushSyncWorkAcrossRoots_impl(onlyLegacy: boolean) {
232
234
root === workInProgressRoot ? workInProgressRootRenderLanes : NoLanes ,
233
235
) ;
234
236
if ( includesSyncLane ( nextLanes ) ) {
237
+ // Avoid triggering the warning on selective hydartion
238
+ if ( ! includesSomeLane ( nextLanes , UpdateLanes ) ) {
239
+ nestedUpdatePasses = 0 ;
240
+ }
235
241
// This root has pending sync work. Flush it now.
236
242
try {
237
243
didPerformSomeWork = true ;
Original file line number Diff line number Diff line change @@ -3010,9 +3010,9 @@ function commitRootImpl(
3010
3010
// those scenarios otherwise. This won't catch recursive async updates,
3011
3011
// though, which is why we check the flags above first.
3012
3012
// Was the finished render the result of an update (not hydration)?
3013
- includesSomeLane ( lanes , UpdateLanes ) &&
3014
- // Did it schedule a sync update?
3015
- includesSomeLane ( remainingLanes , SyncUpdateLanes )
3013
+ ( includesSomeLane ( lanes , UpdateLanes ) &&
3014
+ // Did it schedule a sync update?
3015
+ includesSomeLane ( remainingLanes , SyncUpdateLanes ) )
3016
3016
) {
3017
3017
if ( enableProfilerTimer && enableProfilerNestedUpdatePhase ) {
3018
3018
markNestedUpdateScheduled ( ) ;
You can’t perform that action at this time.
0 commit comments