Skip to content

Commit d279e63

Browse files
zonemeenbrc-dd
andauthored
fix: avoid pushing to history when clicking on the current link (#3405)
Co-authored-by: Divyansh Singh <[email protected]>
1 parent 1ff1534 commit d279e63

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Diff for: src/client/app/router.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -329,7 +329,7 @@ function shouldHotReload(payload: PageDataPayload): boolean {
329329
}
330330

331331
function updateHistory(href: string) {
332-
if (inBrowser && href !== normalizeHref(location.href)) {
332+
if (inBrowser && normalizeHref(href) !== normalizeHref(location.href)) {
333333
// save scroll position before changing url
334334
history.replaceState({ scrollPosition: window.scrollY }, document.title)
335335
history.pushState(null, '', href)

0 commit comments

Comments
 (0)