File tree Expand file tree Collapse file tree 1 file changed +4
-4
lines changed
packages/runtime/src/templates Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -70,11 +70,11 @@ const getNetlifyNextServer = (NextServer: NextServerType) => {
7070
7171 // doing what they do in https://github.com/vercel/vercel/blob/1663db7ca34d3dd99b57994f801fb30b72fbd2f3/packages/next/src/server-build.ts#L576-L580
7272 private netlifyPrebundleReact ( path : string ) {
73- const routesManifest = this . getRoutesManifest ( )
74- const appPathsManifest = this . getAppPathsManifest ( )
73+ const routesManifest = this . getRoutesManifest ?. ( )
74+ const appPathsManifest = this . getAppPathsManifest ?. ( )
7575
76- const routes = [ ...routesManifest . staticRoutes , ...routesManifest . dynamicRoutes ]
77- const matchedRoute = routes . find ( ( route ) => new RegExp ( route . regex ) . test ( path ) )
76+ const routes = routesManifest && [ ...routesManifest . staticRoutes , ...routesManifest . dynamicRoutes ]
77+ const matchedRoute = routes ? .find ( ( route ) => new RegExp ( route . regex ) . test ( path ) )
7878 const isAppRoute =
7979 appPathsManifest && matchedRoute ? appPathsManifest [ joinPaths ( matchedRoute . page , 'page' ) ] : false
8080
You can’t perform that action at this time.
0 commit comments