1
0
Fork 0
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:
Tim Neutkens 2018-05-16 10:08:18 +02:00
parent 3a6fee2a8a
commit 44c7aa44c3

View file

@ -193,7 +193,7 @@ export default class HotReloader {
// 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) {
changedPageRoutes = changedPageRoutes.filter((route) => route !== '/_app')
changedPageRoutes = changedPageRoutes.filter((route) => route !== '/_app' && route !== '/_document')
}
for (const changedPageRoute of changedPageRoutes) {