Unverified Commit cd1a2fbd authored by Tim Neutkens's avatar Tim Neutkens Committed by GitHub

Add check for added/deleted pages (#4497)

parent 8cbc0be8
......@@ -190,9 +190,9 @@ export default class HotReloader {
changedPageRoutes.push(route)
}
// This means `/_app` is most likely included in the list.
// We filter it out because `/_app` will be re-rendered with the page
if (changedPageRoutes.length > 1) {
// This means `/_app` is most likely included in the list, or a page was added/deleted in this compilation run.
// This means we should filter out `/_app` because `/_app` will be re-rendered with the page reload.
if (added.size !== 0 || removed.size !== 0 || changedPageRoutes.length > 1) {
changedPageRoutes = changedPageRoutes.filter((route) => route !== '/_app' && route !== '/_document')
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment