Skip to content

Commit

Permalink
feat: added support for 404 page
Browse files Browse the repository at this point in the history
  • Loading branch information
dhmacs committed Sep 22, 2020
1 parent ab2bdf9 commit 244d373
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions handlers/default-handler.js
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,12 @@ const router = (manifest) => {
}
}

// If 404 page has been defined return it
const notFoundPage = html.nonDynamic["/404"] || ssr.nonDynamic["/404"];
if (notFoundPage) {
return notFoundPage;
}

// path didn't match any route, return error page
return "pages/_error.js";
};
Expand Down

0 comments on commit 244d373

Please sign in to comment.