Skip to content

Commit

Permalink
fix: rewrites could be empty
Browse files Browse the repository at this point in the history
  • Loading branch information
conico974 committed Jul 11, 2023
1 parent d780a49 commit f866acf
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion packages/open-next/src/adapters/util.ts
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ export function loadRoutesManifest(nextDir: string) {
const json = fs.readFileSync(filePath, "utf-8");
const routesManifest = JSON.parse(json) as RoutesManifest;

const rewrites = routesManifest.rewrites.beforeFiles;
const rewrites = routesManifest.rewrites.beforeFiles ?? [];
// Rewrite routes first, then static routes then dynamic routes
return {
rewrites,
Expand Down

0 comments on commit f866acf

Please sign in to comment.