Unverified Commit c6535edc authored by Gerald Monaco's avatar Gerald Monaco Committed by GitHub

Remove unnecessary loadGetInitialProps (#13159)

parent d257d445
...@@ -488,25 +488,6 @@ const wrapApp = (App) => (props) => { ...@@ -488,25 +488,6 @@ const wrapApp = (App) => (props) => {
} }
async function doRender({ App, Component, props, err }) { async function doRender({ App, Component, props, err }) {
// Usual getInitialProps fetching is handled in next/router
// this is for when ErrorComponent gets replaced by Component by HMR
if (
!props &&
Component &&
Component !== ErrorComponent &&
lastAppProps.Component === ErrorComponent
) {
const { pathname, query, asPath } = router
const AppTree = wrapApp(App)
const appCtx = {
router,
AppTree,
Component: ErrorComponent,
ctx: { err, pathname, query, asPath, AppTree },
}
props = await loadGetInitialProps(App, appCtx)
}
Component = Component || lastAppProps.Component Component = Component || lastAppProps.Component
props = props || lastAppProps.props props = props || lastAppProps.props
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment