mirror of
https://github.com/dillonkearns/elm-pages-v3-beta.git
synced 2024-12-26 13:21:42 +03:00
Handle 404 response for content.json with page render.
This commit is contained in:
parent
f4197dd840
commit
f890a48653
2
examples/docs/static/hmr.js
vendored
2
examples/docs/static/hmr.js
vendored
@ -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 {
|
||||
|
@ -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 {
|
||||
|
Loading…
Reference in New Issue
Block a user