Skip to content

Commit 04e715a

Browse files
committed
fix(react-router): update error handling in MatchInner to access error data directly
Signed-off-by: leesb971204 <[email protected]>
1 parent dae8833 commit 04e715a

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

packages/react-router/src/Match.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -268,7 +268,7 @@ export const MatchInner = React.memo(function MatchInnerImpl({
268268

269269
if (match.status === 'notFound') {
270270
invariant(isNotFound(match.error), 'Expected a notFound error')
271-
return renderRouteNotFound(router, route, match.error)
271+
return renderRouteNotFound(router, route, match.error.data)
272272
}
273273

274274
if (match.status === 'redirected') {

0 commit comments

Comments
 (0)