File tree Expand file tree Collapse file tree 1 file changed +9
-3
lines changed
packages/react-dom-bindings/src/client Expand file tree Collapse file tree 1 file changed +9
-3
lines changed Original file line number Diff line number Diff line change @@ -1577,7 +1577,10 @@ function cancelAllViewTransitionAnimations(scope: Element) {
15771577// either cached the font or preloaded it earlier.
15781578const SUSPENSEY_FONT_TIMEOUT = 500 ;
15791579
1580- function customizeViewTransitionError ( error : Object ) : mixed {
1580+ function customizeViewTransitionError (
1581+ error : Object ,
1582+ ignoreAbort : boolean ,
1583+ ) : mixed {
15811584 if ( typeof error === 'object' && error !== null ) {
15821585 switch ( error . name ) {
15831586 case 'TimeoutError ': {
@@ -1596,6 +1599,9 @@ function customizeViewTransitionError(error: Object): mixed {
15961599 break ;
15971600 }
15981601 case 'AbortError ': {
1602+ if ( ignoreAbort ) {
1603+ return null ;
1604+ }
15991605 if ( __DEV__ ) {
16001606 // eslint-disable-next-line react-internal/prod-error-codes
16011607 return new Error (
@@ -1708,7 +1714,7 @@ export function startViewTransition(
17081714 ownerDocument . __reactViewTransition = transition ;
17091715 const handleError = ( error : mixed ) => {
17101716 try {
1711- error = customizeViewTransitionError ( error ) ;
1717+ error = customizeViewTransitionError ( error , false ) ;
17121718 if ( error !== null ) {
17131719 errorCallback ( error ) ;
17141720 }
@@ -1998,7 +2004,7 @@ export function startGestureTransition(
19982004 : readyCallback ;
19992005 const handleError = ( error : mixed ) => {
20002006 try {
2001- error = customizeViewTransitionError ( error ) ;
2007+ error = customizeViewTransitionError ( error , true ) ;
20022008 if ( error !== null ) {
20032009 errorCallback ( error ) ;
20042010 }
You can’t perform that action at this time.
0 commit comments