mirror of
https://github.com/terribleplan/next.js.git
synced 2024-01-19 02:48:18 +00:00
Make sure _document doesn’t reload the page when switching pages
This commit is contained in:
parent
3a6fee2a8a
commit
44c7aa44c3
|
@ -193,7 +193,7 @@ export default class HotReloader {
|
||||||
// This means `/_app` is most likely included in the list.
|
// This means `/_app` is most likely included in the list.
|
||||||
// We filter it out because `/_app` will be re-rendered with the page
|
// We filter it out because `/_app` will be re-rendered with the page
|
||||||
if (changedPageRoutes.length > 1) {
|
if (changedPageRoutes.length > 1) {
|
||||||
changedPageRoutes = changedPageRoutes.filter((route) => route !== '/_app')
|
changedPageRoutes = changedPageRoutes.filter((route) => route !== '/_app' && route !== '/_document')
|
||||||
}
|
}
|
||||||
|
|
||||||
for (const changedPageRoute of changedPageRoutes) {
|
for (const changedPageRoute of changedPageRoutes) {
|
||||||
|
|
Loading…
Reference in a new issue