From 05616d2f6120824003239c9d7b318daeb5c03c0c Mon Sep 17 00:00:00 2001 From: Sebastian Markbage Date: Thu, 13 Mar 2025 20:36:22 -0400 Subject: [PATCH] Gate flushGestureMutations and flushGestureAnimations --- packages/react-reconciler/src/ReactFiberWorkLoop.js | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/packages/react-reconciler/src/ReactFiberWorkLoop.js b/packages/react-reconciler/src/ReactFiberWorkLoop.js index d7fe0893633fc..380fa20c3d1c1 100644 --- a/packages/react-reconciler/src/ReactFiberWorkLoop.js +++ b/packages/react-reconciler/src/ReactFiberWorkLoop.js @@ -3927,6 +3927,9 @@ function commitGestureOnRoot( } function flushGestureMutations(): void { + if (!enableSwipeTransition) { + return; + } if (pendingEffectsStatus !== PENDING_GESTURE_MUTATION_PHASE) { return; } @@ -3953,6 +3956,9 @@ function flushGestureMutations(): void { } function flushGestureAnimations(): void { + if (!enableSwipeTransition) { + return; + } // If we get canceled before we start we might not have applied // mutations yet. We need to apply them first. flushGestureMutations();