File tree 1 file changed +13
-1
lines changed
packages/react-dom-bindings/src/client
1 file changed +13
-1
lines changed Original file line number Diff line number Diff line change @@ -1802,6 +1802,12 @@ export function startViewTransition(
1802
1802
}
1803
1803
} finally {
1804
1804
// Continue the reset of the work.
1805
+ // If the error happened in the snapshot phase before the update callback
1806
+ // was invoked, then we need to first finish the mutation and layout phases.
1807
+ // If they're already invoked it's still safe to call them due the status check.
1808
+ mutationCallback ( ) ;
1809
+ layoutCallback ( ) ;
1810
+ // Skip afterMutationCallback() since we're not animating.
1805
1811
spawnedWorkCallback ( ) ;
1806
1812
}
1807
1813
} ;
@@ -2137,7 +2143,13 @@ export function startGestureTransition(
2137
2143
}
2138
2144
} finally {
2139
2145
// Continue the reset of the work.
2140
- readyCallback ( ) ;
2146
+ // If the error happened in the snapshot phase before the update callback
2147
+ // was invoked, then we need to first finish the mutation and layout phases.
2148
+ // If they're already invoked it's still safe to call them due the status check.
2149
+ mutationCallback ( ) ;
2150
+ // Skip readyCallback() and go straight to animateCallbck() since we're not animating.
2151
+ // animateCallback() is still required to restore states.
2152
+ animateCallback ( ) ;
2141
2153
}
2142
2154
} ;
2143
2155
transition . ready . then ( readyForAnimations , handleError ) ;
You can’t perform that action at this time.
0 commit comments