Skip to content

Commit d645f12

Browse files
piehwardpeet
authored andcommitted
fix(gatsby): make sure 404 and 500 page inherit stateful status from original page (gatsbyjs#33544)
1 parent 4bd533d commit d645f12

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

packages/gatsby/src/internal-plugins/prod-404-500/gatsby-node.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,8 @@ emitter.on(`CREATE_PAGE`, action => {
3232
...storedPage,
3333
path: `/${status}.html`,
3434
},
35-
action.plugin
35+
action.plugin,
36+
action
3637
)
3738
)
3839
}

packages/gatsby/src/utils/changed-pages.ts

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,7 @@ export function deleteUntouchedPages(
1717
if (
1818
(shouldRunCreatePagesStatefully ||
1919
!page.isCreatedByStatefulCreatePages) &&
20-
page.updatedAt < timeBeforeApisRan &&
21-
page.path !== `/404.html`
20+
page.updatedAt < timeBeforeApisRan
2221
) {
2322
store.dispatch(deletePage(page))
2423
deletedPages.push(page.path, `/page-data${page.path}`)

0 commit comments

Comments
 (0)