Skip to content

Commit 55b18e6

Browse files
fix: prevent infinite loop when / is ISR (#1020)
Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
1 parent 62ba8dc commit 55b18e6

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/helpers/files.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -111,7 +111,7 @@ export const moveStaticPages = async ({
111111
Object.entries(prerenderManifest.routes).forEach(([route, { initialRevalidateSeconds }]) => {
112112
if (initialRevalidateSeconds) {
113113
// Find all files used by ISR routes
114-
const trimmedPath = route.slice(1)
114+
const trimmedPath = route === '/' ? 'index' : route.slice(1)
115115
isrFiles.add(`${trimmedPath}.html`)
116116
isrFiles.add(`${trimmedPath}.json`)
117117
if (initialRevalidateSeconds < MINIMUM_REVALIDATE_SECONDS) {

0 commit comments

Comments
 (0)