@@ -107,6 +107,7 @@ import {
107107 StrictLegacyMode ,
108108 ProfileMode ,
109109 ConcurrentMode ,
110+ ConcurrentUpdatesByDefaultMode ,
110111} from './ReactTypeOfMode' ;
111112import {
112113 HostRoot ,
@@ -440,6 +441,7 @@ export function requestUpdateLane(fiber: Fiber): Lane {
440441 if ( updateLane !== NoLane ) {
441442 if (
442443 enableSyncDefaultUpdates &&
444+ ( mode & ConcurrentUpdatesByDefaultMode ) === NoMode &&
443445 ( updateLane === InputContinuousLane ||
444446 updateLane === InputContinuousHydrationLane )
445447 ) {
@@ -457,6 +459,7 @@ export function requestUpdateLane(fiber: Fiber): Lane {
457459 const eventLane : Lane = ( getCurrentEventPriority ( ) : any ) ;
458460 if (
459461 enableSyncDefaultUpdates &&
462+ ( mode & ConcurrentUpdatesByDefaultMode ) === NoMode &&
460463 ( eventLane === InputContinuousLane ||
461464 eventLane === InputContinuousHydrationLane )
462465 ) {
@@ -716,6 +719,7 @@ function ensureRootIsScheduled(root: FiberRoot, currentTime: number) {
716719 let newCallbackNode;
717720 if (
718721 enableSyncDefaultUpdates &&
722+ ( root . current . mode & ConcurrentUpdatesByDefaultMode ) === NoMode &&
719723 ( newCallbackPriority === DefaultLane ||
720724 newCallbackPriority === DefaultHydrationLane )
721725 ) {
@@ -1058,7 +1062,11 @@ function performSyncWorkOnRoot(root) {
10581062 const finishedWork : Fiber = ( root . current . alternate : any ) ;
10591063 root . finishedWork = finishedWork ;
10601064 root . finishedLanes = lanes ;
1061- if ( enableSyncDefaultUpdates && ! includesSomeLane ( lanes , SyncLane ) ) {
1065+ if (
1066+ enableSyncDefaultUpdates &&
1067+ ( root . current . mode & ConcurrentUpdatesByDefaultMode ) === NoMode &&
1068+ ! includesSomeLane ( lanes , SyncLane )
1069+ ) {
10621070 finishConcurrentRender ( root , exitStatus , lanes ) ;
10631071 } else {
10641072 commitRoot ( root ) ;
0 commit comments