diff --git a/src/client/app/router.ts b/src/client/app/router.ts index de55ab42..8b097254 100644 --- a/src/client/app/router.ts +++ b/src/client/app/router.ts @@ -57,7 +57,7 @@ export function createRouter( href = url.pathname + url.search + url.hash } } - if (inBrowser) { + if (inBrowser && href !== location.href) { // save scroll position before changing url history.replaceState({ scrollPosition: window.scrollY }, document.title) history.pushState(null, '', href)