Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Pages created by "stateful" plugins can get deleted (e.g. those in src/pages) #12249

Closed
KyleAMathews opened this issue Mar 3, 2019 · 1 comment · Fixed by #12297
Closed
Labels
type: bug An issue or pull request relating to a bug in Gatsby

Comments

@KyleAMathews
Copy link
Contributor

Something caused (exposed?) by #11831

@KyleAMathews
Copy link
Contributor Author

// Delete pages that weren't updated when running createPages.
Array.from(store.getState().pages.values()).forEach(page => {
if (
!_.includes(statefulPlugins, page.pluginCreatorId) &&
page.updatedAt < timestamp
) {
deleteComponentsDependencies([page.path])
deletePage(page)
}
})

@sidharthachatterjee sidharthachatterjee added the type: bug An issue or pull request relating to a bug in Gatsby label Mar 4, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type: bug An issue or pull request relating to a bug in Gatsby
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants