Skip to content

Commit 5c270d8

Browse files
committed
chore: handle empty static manifest
1 parent a4c4f84 commit 5c270d8

File tree

1 file changed

+4
-1
lines changed
  • packages/runtime/src/helpers

1 file changed

+4
-1
lines changed

packages/runtime/src/helpers/edge.ts

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -280,7 +280,10 @@ export const writeEdgeFunctions = async ({
280280
const appPathRoutesManifest = await loadAppPathRoutesManifest(netlifyConfig)
281281

282282
const pageRegexMap = new Map(
283-
[...routesManifest.dynamicRoutes, ...routesManifest.staticRoutes].map((route) => [route.page, route.regex]),
283+
[...(routesManifest.dynamicRoutes || []), ...(routesManifest.staticRoutes || [])].map((route) => [
284+
route.page,
285+
route.regex,
286+
]),
284287
)
285288

286289
for (const edgeFunctionDefinition of Object.values(middlewareManifest.functions)) {

0 commit comments

Comments
 (0)