Skip to content

Commit 3f0526b

Browse files
fix(rsc): remove manual error bubbling (#13973)
1 parent 1b459f5 commit 3f0526b

File tree

1 file changed

+1
-9
lines changed

1 file changed

+1
-9
lines changed

packages/react-router/lib/rsc/server.rsc.ts

Lines changed: 1 addition & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -946,16 +946,8 @@ async function getRSCRouteMatch(
946946
undefined;
947947
let error: unknown = undefined;
948948

949-
// FIXME: Is this logic right? We don't want to take any error - only the
950-
// error pegged to our route because the staticHandler should have done the
951-
// bubbling for us (on document requests at least)?
952949
if (ErrorBoundary && staticContext.errors) {
953-
for (const match of [...staticContext.matches].reverse()) {
954-
if (match.route.id in staticContext.errors) {
955-
error = staticContext.errors[match.route.id];
956-
break;
957-
}
958-
}
950+
error = staticContext.errors[match.route.id];
959951
}
960952
const errorElement = ErrorBoundary
961953
? React.createElement(

0 commit comments

Comments
 (0)