File tree Expand file tree Collapse file tree 1 file changed +4
-3
lines changed
packages/react-router/lib/router Expand file tree Collapse file tree 1 file changed +4
-3
lines changed Original file line number Diff line number Diff line change @@ -5443,7 +5443,7 @@ async function callLoaderOrAction({
54435443 // If we have a promise for a lazy route, await that first
54445444 if ( lazyHandlerPromise || lazyRoutePromise ) {
54455445 if ( handler ) {
5446- // Run statically defined handler in parallel with lazy()
5446+ // Run statically defined handler in parallel with lazy route loading
54475447 let handlerError ;
54485448 let [ value ] = await Promise . all ( [
54495449 // If the handler throws, don't let it immediately bubble out,
@@ -5452,6 +5452,7 @@ async function callLoaderOrAction({
54525452 runHandler ( handler ) . catch ( ( e ) => {
54535453 handlerError = e ;
54545454 } ) ,
5455+ // Ensure all lazy route promises are resolved before continuing
54555456 lazyHandlerPromise ,
54565457 lazyRoutePromise ,
54575458 ] ) ;
@@ -5469,8 +5470,8 @@ async function callLoaderOrAction({
54695470 if ( handler ) {
54705471 // Handler still runs even if we got interrupted to maintain consistency
54715472 // with un-abortable behavior of handler execution on non-lazy or
5472- // previously-lazy-loaded routes. We also ensure the entire lazy
5473- // route is loaded before continuing.
5473+ // previously-lazy-loaded routes. We also ensure all lazy route
5474+ // promises are resolved before continuing.
54745475 [ result ] = await Promise . all ( [ runHandler ( handler ) , lazyRoutePromise ] ) ;
54755476 } else if ( type === "action" ) {
54765477 let url = new URL ( request . url ) ;
You can’t perform that action at this time.
0 commit comments