@@ -107,6 +107,7 @@ import {
107
107
StrictLegacyMode ,
108
108
ProfileMode ,
109
109
ConcurrentMode ,
110
+ ConcurrentUpdatesByDefaultMode ,
110
111
} from './ReactTypeOfMode' ;
111
112
import {
112
113
HostRoot ,
@@ -440,6 +441,7 @@ export function requestUpdateLane(fiber: Fiber): Lane {
440
441
if ( updateLane !== NoLane ) {
441
442
if (
442
443
enableSyncDefaultUpdates &&
444
+ ( mode & ConcurrentUpdatesByDefaultMode ) === NoMode &&
443
445
( updateLane === InputContinuousLane ||
444
446
updateLane === InputContinuousHydrationLane )
445
447
) {
@@ -457,6 +459,7 @@ export function requestUpdateLane(fiber: Fiber): Lane {
457
459
const eventLane : Lane = ( getCurrentEventPriority ( ) : any ) ;
458
460
if (
459
461
enableSyncDefaultUpdates &&
462
+ ( mode & ConcurrentUpdatesByDefaultMode ) === NoMode &&
460
463
( eventLane === InputContinuousLane ||
461
464
eventLane === InputContinuousHydrationLane )
462
465
) {
@@ -716,6 +719,7 @@ function ensureRootIsScheduled(root: FiberRoot, currentTime: number) {
716
719
let newCallbackNode;
717
720
if (
718
721
enableSyncDefaultUpdates &&
722
+ ( root . current . mode & ConcurrentUpdatesByDefaultMode ) === NoMode &&
719
723
( newCallbackPriority === DefaultLane ||
720
724
newCallbackPriority === DefaultHydrationLane )
721
725
) {
@@ -1058,7 +1062,11 @@ function performSyncWorkOnRoot(root) {
1058
1062
const finishedWork : Fiber = ( root . current . alternate : any ) ;
1059
1063
root . finishedWork = finishedWork ;
1060
1064
root . finishedLanes = lanes ;
1061
- if ( enableSyncDefaultUpdates && ! includesSomeLane ( lanes , SyncLane ) ) {
1065
+ if (
1066
+ enableSyncDefaultUpdates &&
1067
+ ( root . current . mode & ConcurrentUpdatesByDefaultMode ) === NoMode &&
1068
+ ! includesSomeLane ( lanes , SyncLane )
1069
+ ) {
1062
1070
finishConcurrentRender ( root , exitStatus , lanes ) ;
1063
1071
} else {
1064
1072
commitRoot ( root ) ;
0 commit comments