diff --git a/packages/gatsby/src/internal-plugins/prod-404-500/gatsby-node.js b/packages/gatsby/src/internal-plugins/prod-404-500/gatsby-node.js index 2121b5aeec47d..5a4cfb0fa07eb 100644 --- a/packages/gatsby/src/internal-plugins/prod-404-500/gatsby-node.js +++ b/packages/gatsby/src/internal-plugins/prod-404-500/gatsby-node.js @@ -32,7 +32,8 @@ emitter.on(`CREATE_PAGE`, action => { ...storedPage, path: `/${status}.html`, }, - action.plugin + action.plugin, + action ) ) } diff --git a/packages/gatsby/src/utils/changed-pages.ts b/packages/gatsby/src/utils/changed-pages.ts index 16a76dbafbe42..0359ee4d9d809 100644 --- a/packages/gatsby/src/utils/changed-pages.ts +++ b/packages/gatsby/src/utils/changed-pages.ts @@ -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}`)