Skip to content

Commit

Permalink
Make sure _document doesn’t reload the page when switching pages
Browse files Browse the repository at this point in the history
  • Loading branch information
timneutkens committed May 16, 2018
1 parent 3a6fee2 commit 44c7aa4
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion server/hot-reloader.js
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down

0 comments on commit 44c7aa4

Please sign in to comment.