File tree Expand file tree Collapse file tree 1 file changed +7
-4
lines changed
packages/react-router/lib/router Expand file tree Collapse file tree 1 file changed +7
-4
lines changed Original file line number Diff line number Diff line change @@ -3623,12 +3623,12 @@ export function createStaticHandler(
36233623 // We never even got to the handlers, so we've got no data -
36243624 // just create an empty context reflecting the error.
36253625
3626+ // Find the boundary at or above the source of the middleware
3627+ // error or the highest loader. We can't render any UI below
3628+ // the highest loader since we have no loader data available
36263629 let boundaryRouteId = skipLoaderErrorBubbling
36273630 ? routeId
3628- : // Find the boundary at or above the source of the middleware
3629- // error or the highest loader. We can't render any UI below
3630- // the highest loader since we have no loader data available
3631- findNearestBoundary (
3631+ : findNearestBoundary (
36323632 matches ,
36333633 matches . find (
36343634 ( m ) => m . route . id === routeId || m . route . loader
@@ -6039,6 +6039,9 @@ function processRouteLoaderData(
60396039 if ( skipLoaderErrorBubbling ) {
60406040 errors [ id ] = error ;
60416041 } else {
6042+ // Look upwards from the matched route for the closest ancestor error
6043+ // boundary, defaulting to the root match. Prefer higher error values
6044+ // if lower errors bubble to the same boundary
60426045 let boundaryMatch = findNearestBoundary ( matches , id ) ;
60436046 if ( errors [ boundaryMatch . route . id ] == null ) {
60446047 errors [ boundaryMatch . route . id ] = error ;
You can’t perform that action at this time.
0 commit comments