Skip to content

Commit 4a73df4

Browse files
committed
fix: Ensure dynamic routes are excluded in getStaticAPIRoutes
1 parent d07c9f1 commit 4a73df4

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

packages/open-next/src/core/routing/routeMatcher.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -86,8 +86,8 @@ function getStaticAPIRoutes(): RouteDefinition[] {
8686
const appPathsStaticAPIRoutes = Object.values(AppPathRoutesManifest)
8787
.filter(
8888
(route) =>
89-
route.startsWith("/api/") ||
90-
(route === "/api" && !dynamicRoutePages.has(route)),
89+
(route.startsWith("/api/") || route === "/api") &&
90+
!dynamicRoutePages.has(route),
9191
)
9292
.map(createRouteDefinition);
9393

0 commit comments

Comments
 (0)