Skip to content

Commit

Permalink
fix: Prevent page to scroll to top during data HMR (#35739)
Browse files Browse the repository at this point in the history
  • Loading branch information
schickling authored Mar 30, 2022
1 parent ced2040 commit cae9506
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion packages/next/client/next-dev.js
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,8 @@ initialize({ webpackHMR })
new URLSearchParams(location.search)
)
),
router.asPath
router.asPath,
{ scroll: false }
)
.finally(clearIndicator)
}
Expand Down

0 comments on commit cae9506

Please sign in to comment.