@@ -20,6 +20,7 @@ import {
20
20
enableComponentPerformanceTrack ,
21
21
enableSiblingPrerendering ,
22
22
enableYieldingBeforePassive ,
23
+ enableSwipeTransition ,
23
24
} from 'shared/ReactFeatureFlags' ;
24
25
import {
25
26
NoLane ,
@@ -32,6 +33,7 @@ import {
32
33
claimNextTransitionLane ,
33
34
getNextLanesToFlushSync ,
34
35
checkIfRootIsPrerendering ,
36
+ isGestureRender ,
35
37
} from './ReactFiberLane' ;
36
38
import {
37
39
CommitContext ,
@@ -211,7 +213,8 @@ function flushSyncWorkAcrossRoots_impl(
211
213
rootHasPendingCommit ,
212
214
) ;
213
215
if (
214
- includesSyncLane ( nextLanes ) &&
216
+ ( includesSyncLane ( nextLanes ) ||
217
+ ( enableSwipeTransition && isGestureRender ( nextLanes ) ) ) &&
215
218
! checkIfRootIsPrerendering ( root , nextLanes )
216
219
) {
217
220
// This root has pending sync work. Flush it now.
@@ -296,7 +299,8 @@ function processRootScheduleInMicrotask() {
296
299
syncTransitionLanes !== NoLanes ||
297
300
// Common case: we're not treating any extra lanes as synchronous, so we
298
301
// can just check if the next lanes are sync.
299
- includesSyncLane ( nextLanes )
302
+ ( includesSyncLane ( nextLanes ) ||
303
+ ( enableSwipeTransition && isGestureRender ( nextLanes ) ) )
300
304
) {
301
305
mightHavePendingSyncWork = true ;
302
306
}
0 commit comments