Skip to content

Commit

Permalink
fix(gatsby): make sure 404 and 500 page inherit stateful status from …
Browse files Browse the repository at this point in the history
…original page (#33544)
  • Loading branch information
pieh committed Oct 18, 2021
1 parent 68e5b90 commit d2329df
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
Expand Up @@ -32,7 +32,8 @@ emitter.on(`CREATE_PAGE`, action => {
...storedPage,
path: `/${status}.html`,
},
action.plugin
action.plugin,
action
)
)
}
Expand Down
3 changes: 1 addition & 2 deletions packages/gatsby/src/utils/changed-pages.ts
Expand Up @@ -17,8 +17,7 @@ export function deleteUntouchedPages(
if (
(shouldRunCreatePagesStatefully ||
!page.isCreatedByStatefulCreatePages) &&
page.updatedAt < timeBeforeApisRan &&
page.path !== `/404.html`
page.updatedAt < timeBeforeApisRan
) {
store.dispatch(deletePage(page))
deletedPages.push(page.path, `/page-data${page.path}`)
Expand Down

0 comments on commit d2329df

Please sign in to comment.