Handle 404 response for content.json with page render.

This commit is contained in:
Dillon Kearns 2021-04-21 06:09:26 -07:00
parent f4197dd840
commit f890a48653
2 changed files with 2 additions and 2 deletions

View File

@ -69,7 +69,7 @@ function fetchContentJsonForCurrentPage() {
const contentJsonForPage = await fetch(
`${window.location.origin}${currentPath}content.json`
);
if (contentJsonForPage.ok) {
if (contentJsonForPage.ok || contentJsonForPage.status === 404) {
resolve(await contentJsonForPage.json());
} else {
try {

View File

@ -69,7 +69,7 @@ function fetchContentJsonForCurrentPage() {
const contentJsonForPage = await fetch(
`${window.location.origin}${currentPath}content.json`
);
if (contentJsonForPage.ok) {
if (contentJsonForPage.ok || contentJsonForPage.status === 404) {
resolve(await contentJsonForPage.json());
} else {
try {