File tree 1 file changed +4
-4
lines changed
packages/runtime/src/templates
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) => {
70
70
71
71
// doing what they do in https://github.com/vercel/vercel/blob/1663db7ca34d3dd99b57994f801fb30b72fbd2f3/packages/next/src/server-build.ts#L576-L580
72
72
private netlifyPrebundleReact ( path : string ) {
73
- const routesManifest = this . getRoutesManifest ( )
74
- const appPathsManifest = this . getAppPathsManifest ( )
73
+ const routesManifest = this . getRoutesManifest ?. ( )
74
+ const appPathsManifest = this . getAppPathsManifest ?. ( )
75
75
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 ) )
78
78
const isAppRoute =
79
79
appPathsManifest && matchedRoute ? appPathsManifest [ joinPaths ( matchedRoute . page , 'page' ) ] : false
80
80
You can’t perform that action at this time.
0 commit comments