File tree Expand file tree Collapse file tree 2 files changed +7
-4
lines changed
packages/next/src/client/components Expand file tree Collapse file tree 2 files changed +7
-4
lines changed Original file line number Diff line number Diff line change @@ -66,8 +66,9 @@ class NotFoundErrorBoundary extends React.Component<
6666 notFoundTriggered : true ,
6767 }
6868 }
69- // Re-throw if error is not for 404
70- throw error
69+ return {
70+ notFoundTriggered : false ,
71+ }
7172 }
7273
7374 static getDerivedStateFromProps (
Original file line number Diff line number Diff line change @@ -54,8 +54,10 @@ export class RedirectErrorBoundary extends React.Component<
5454 const redirectType = getRedirectTypeFromError ( error )
5555 return { redirect : url , redirectType }
5656 }
57- // Re-throw if error is not for redirect
58- throw error
57+ return {
58+ redirect : null ,
59+ redirectType : null ,
60+ }
5961 }
6062
6163 // Explicit type is needed to avoid the generated `.d.ts` having a wide return type that could be specific the the `@types/react` version.
You can’t perform that action at this time.
0 commit comments