Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 16 additions & 0 deletions packages/react-dom-bindings/src/client/ReactFiberConfigDOM.js
Original file line number Diff line number Diff line change
Expand Up @@ -2279,6 +2279,11 @@ export function startViewTransition(
spawnedWorkCallback();
};
const handleError = (error: mixed) => {
// $FlowFixMe[prop-missing]
if (ownerDocument.__reactViewTransition === transition) {
// $FlowFixMe[prop-missing]
ownerDocument.__reactViewTransition = null;
}
try {
error = customizeViewTransitionError(error, false);
if (error !== null) {
Expand All @@ -2293,6 +2298,9 @@ export function startViewTransition(
layoutCallback();
// Skip afterMutationCallback() since we're not animating.
spawnedWorkCallback();
if (enableProfilerTimer) {
finishedAnimation();
}
}
};
transition.ready.then(readyCallback, handleError);
Expand Down Expand Up @@ -2699,6 +2707,11 @@ export function startGestureTransition(
? () => requestAnimationFrame(readyCallback)
: readyCallback;
const handleError = (error: mixed) => {
// $FlowFixMe[prop-missing]
if (ownerDocument.__reactViewTransition === transition) {
// $FlowFixMe[prop-missing]
ownerDocument.__reactViewTransition = null;
}
try {
error = customizeViewTransitionError(error, true);
if (error !== null) {
Expand All @@ -2713,6 +2726,9 @@ export function startGestureTransition(
// Skip readyCallback() and go straight to animateCallbck() since we're not animating.
// animateCallback() is still required to restore states.
animateCallback();
if (enableProfilerTimer) {
finishedAnimation();
}
}
};
transition.ready.then(readyForAnimations, handleError);
Expand Down
Loading