Skip to content

Commit d2329df

Browse files
authoredOct 18, 2021
fix(gatsby): make sure 404 and 500 page inherit stateful status from original page (#33544)
1 parent 68e5b90 commit d2329df

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

+2-1
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

+1-2
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)
Please sign in to comment.