Skip to content
This repository was archived by the owner on May 10, 2021. It is now read-only.

Commit 6ca545f

Browse files
committed
Fixed redirect for index with getServerSideProps
1 parent 6d66e1b commit 6ca545f

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lib/allNextJsPages.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ const getAllPages = () => {
5555
// the JSON data to the Netlify Function.
5656
const dataRoute = dataRoutes.find(({ page }) => page === route);
5757
if (dataRoute)
58-
alternativeRoutes.push(join("/_next/data", buildId, `${route}.json`));
58+
alternativeRoutes.push(join("/_next/data", buildId, `${route === "/" ? "/index" : route}.json`));
5959

6060
pages.push(new Page({ route, type, filePath, alternativeRoutes }));
6161
});

0 commit comments

Comments
 (0)