mirror of
https://github.com/terribleplan/next.js.git
synced 2024-01-19 02:48:18 +00:00
Add check for added/deleted pages (#4497)
This commit is contained in:
parent
8cbc0be845
commit
cd1a2fbd91
|
@ -190,9 +190,9 @@ export default class HotReloader {
|
||||||
changedPageRoutes.push(route)
|
changedPageRoutes.push(route)
|
||||||
}
|
}
|
||||||
|
|
||||||
// This means `/_app` is most likely included in the list.
|
// This means `/_app` is most likely included in the list, or a page was added/deleted in this compilation run.
|
||||||
// We filter it out because `/_app` will be re-rendered with the page
|
// This means we should filter out `/_app` because `/_app` will be re-rendered with the page reload.
|
||||||
if (changedPageRoutes.length > 1) {
|
if (added.size !== 0 || removed.size !== 0 || changedPageRoutes.length > 1) {
|
||||||
changedPageRoutes = changedPageRoutes.filter((route) => route !== '/_app' && route !== '/_document')
|
changedPageRoutes = changedPageRoutes.filter((route) => route !== '/_app' && route !== '/_document')
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue