File tree Expand file tree Collapse file tree 1 file changed +7
-9
lines changed Expand file tree Collapse file tree 1 file changed +7
-9
lines changed Original file line number Diff line number Diff line change @@ -2345,15 +2345,13 @@ export class RouterCore<
23452345 // there is a loaderPromise, so we are in the middle of a load
23462346 if ( prevMatch . loaderPromise ) {
23472347 // do not block if we already have stale data we can show
2348- if ( prevMatch . status === 'success' && ! sync ) {
2349- // if the ongoing load is a preload, make sure to execute redirects
2350- if ( prevMatch . preload ) {
2351- prevMatch . loaderPromise . catch ( ( err ) => {
2352- if ( isRedirect ( err ) ) {
2353- return this . navigate ( err . options )
2354- }
2355- } )
2356- }
2348+ // but only if the ongoing load is not a preload since error handling is different for preloads
2349+ // and we don't want to swallow errors
2350+ if (
2351+ prevMatch . status === 'success' &&
2352+ ! sync &&
2353+ ! prevMatch . preload
2354+ ) {
23572355 return this . getMatch ( matchId ) !
23582356 }
23592357 await prevMatch . loaderPromise
You can’t perform that action at this time.
0 commit comments