Skip to content

Commit

Permalink
Fix history usage of PR 9563
Browse files Browse the repository at this point in the history
  • Loading branch information
martrapp committed Jan 2, 2024
1 parent d48ab90 commit 29d15f6
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion packages/astro/src/transitions/router.ts
Original file line number Diff line number Diff line change
Expand Up @@ -215,7 +215,7 @@ const moveToLocation = (to: URL, from: URL, options: Options, historyState?: Sta
history.scrollRestoration = 'auto';
const savedState = history.state;
location.href = to.href; // this kills the history state on Firefox
history.state || history.replaceState(savedState, ''); // this restores the history state
history.state || replaceState(savedState, ''); // this restores the history state
} else {
if (!scrolledToTop) {
scrollTo({ left: 0, top: 0, behavior: 'instant' });
Expand Down

0 comments on commit 29d15f6

Please sign in to comment.