Remove obsolete prerender indicator code (#30004)

`isPrerendered` was used for the prerender indicator, which was removed in #18629
This commit is contained in:
Gerald Monaco 2021-10-17 17:27:19 -07:00 committed by GitHub
parent cf5eededc9
commit 6ba2078b79
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -1187,13 +1187,6 @@ export default class Router implements BaseRouter {
Router.events.emit('beforeHistoryChange', as, routeProps)
this.changeState(method, url, as, options)
if (process.env.NODE_ENV !== 'production') {
const appComp: any = this.components['/_app'].Component
;(window as any).next.isPrerendered =
appComp.getInitialProps === appComp.origGetInitialProps &&
!(routeInfo.Component as any).getInitialProps
}
if (
(options as any)._h &&
pathname === '/_error' &&