mirror of
https://github.com/hanzoai/next.js.git
synced 2026-09-24 17:00:51 +00:00
Fixes: #47978 When an error occurs in getInitialProps, the error page's getInitialProps is run server-side and returned in `__NEXT_DATA__`. Following, there's no need to re-run `getInitialProps` client-side on the hydrate pass. --------- Co-authored-by: JJ Kasper <[email protected]>
8 lines
131 B
TypeScript
8 lines
131 B
TypeScript
export default function Page() {
|
|
return <p>hello world</p>
|
|
}
|
|
|
|
Page.getInitialProps = () => {
|
|
throw new Error('custom error')
|
|
}
|