Skip to content

Commit 3e95680

Browse files
authored
Gate flushGestureMutations and flushGestureAnimations (#32605)
Normally these are gated by the whole commitGestureOnRoot path but in the case of an early commit these phases may need to be invoked. Earlier. Those paths weren't gated which I noticed when I started adding code to them.
1 parent 1b6e3dd commit 3e95680

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

packages/react-reconciler/src/ReactFiberWorkLoop.js

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3927,6 +3927,9 @@ function commitGestureOnRoot(
39273927
}
39283928

39293929
function flushGestureMutations(): void {
3930+
if (!enableSwipeTransition) {
3931+
return;
3932+
}
39303933
if (pendingEffectsStatus !== PENDING_GESTURE_MUTATION_PHASE) {
39313934
return;
39323935
}
@@ -3953,6 +3956,9 @@ function flushGestureMutations(): void {
39533956
}
39543957

39553958
function flushGestureAnimations(): void {
3959+
if (!enableSwipeTransition) {
3960+
return;
3961+
}
39563962
// If we get canceled before we start we might not have applied
39573963
// mutations yet. We need to apply them first.
39583964
flushGestureMutations();

0 commit comments

Comments
 (0)