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

Fixed redirect for index with getServerSideProps #39

Merged
merged 1 commit into from
Sep 13, 2020
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion lib/allNextJsPages.js
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ const getAllPages = () => {
// the JSON data to the Netlify Function.
const dataRoute = dataRoutes.find(({ page }) => page === route);
if (dataRoute)
alternativeRoutes.push(join("/_next/data", buildId, `${route}.json`));
alternativeRoutes.push(join("/_next/data", buildId, `${route === "/" ? "/index" : route}.json`));

pages.push(new Page({ route, type, filePath, alternativeRoutes }));
});
Expand Down