@samitouri / QOS-React / commits / 3e956805e8

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.

Sebastian Markbåge committed Mar 14, 2025 at 13:16 UTC 3e956805e899bff7aea7b19c56e6adaf362cdc2b
1 file changed +6
packages/react-reconciler/src/ReactFiberWorkLoop.js
+6
@@ -3927,6 +3927,9 @@ function commitGestureOnRoot(
3927 }
3928
3929 function flushGestureMutations(): void {
3930 + if (!enableSwipeTransition) {
3931 + return;
3932 + }
3933 if (pendingEffectsStatus !== PENDING_GESTURE_MUTATION_PHASE) {
3934 return;
3935 }
@@ -3953,6 +3956,9 @@ function flushGestureMutations(): void {
3956 }
3957
3958 function flushGestureAnimations(): void {
3959 + if (!enableSwipeTransition) {
3960 + return;
3961 + }
3962 // If we get canceled before we start we might not have applied
3963 // mutations yet. We need to apply them first.
3964 flushGestureMutations();