Skip to content
This repository was archived by the owner on Jan 28, 2025. It is now read-only.

Commit 2e1c6fe

Browse files
committed
fix build issues
1 parent 4344d2d commit 2e1c6fe

File tree

2 files changed

+11
-3
lines changed

2 files changed

+11
-3
lines changed

packages/libs/lambda-at-edge/src/build.ts

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -641,7 +641,9 @@ class Builder {
641641

642642
for (const key in ssrPages.dynamic) {
643643
const newKey = key === "/" ? `/${locale}` : `/${locale}${key}`;
644-
localeSsrPages.dynamic[newKey] = {};
644+
645+
// Initial default value
646+
localeSsrPages.dynamic[newKey] = { file: "", regex: "" };
645647
const newDynamicSsr = Object.assign(
646648
localeSsrPages.dynamic[newKey],
647649
ssrPages.dynamic[key]
@@ -670,7 +672,13 @@ class Builder {
670672

671673
for (const key in ssgPages.nonDynamic) {
672674
const newKey = key === "/" ? `/${locale}` : `/${locale}${key}`;
673-
localeSsgPages.nonDynamic[newKey] = {};
675+
676+
// Initial default value
677+
localeSsgPages.nonDynamic[newKey] = {
678+
initialRevalidateSeconds: false,
679+
srcRoute: null,
680+
dataRoute: ""
681+
};
674682

675683
const newSsgRoute = Object.assign(
676684
localeSsgPages.nonDynamic[newKey],

packages/libs/lambda-at-edge/src/default-handler.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -621,7 +621,7 @@ const hasFallbackForUri = (
621621
let foundFallback:
622622
| {
623623
routeRegex: string;
624-
fallback: string | false;
624+
fallback: string | false | null;
625625
dataRoute: string;
626626
dataRouteRegex: string;
627627
}

0 commit comments

Comments
 (0)