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

Commit

Permalink
Fixed redirect for index with getServerSideProps
Browse files Browse the repository at this point in the history
  • Loading branch information
jonasbuntinx committed Sep 11, 2020
1 parent 6d66e1b commit 6ca545f
Showing 1 changed file with 1 addition and 1 deletion.
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

0 comments on commit 6ca545f

Please sign in to comment.