Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,8 @@ emitter.on(`CREATE_PAGE`, action => {
...storedPage,
path: `/${status}.html`,
},
action.plugin
action.plugin,
action
Comment on lines +35 to +36
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We pass third arg (actionOptions) so that this check

isCreatedByStatefulCreatePages:
actionOptions?.traceId === `initial-createPagesStatefully`,
actually do something.

actionOptions are spread on CREATE_PAGE action itself -

{
...actionOptions,
type: `CREATE_PAGE`,
contextModified,
plugin,
payload: internalPage,
},

)
)
}
Expand Down
3 changes: 1 addition & 2 deletions packages/gatsby/src/utils/changed-pages.ts
Original file line number Diff line number Diff line change
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