Skip to content

Commit

Permalink
Fix history usage of PR 9563 (#9581)
Browse files Browse the repository at this point in the history
  • Loading branch information
martrapp authored Jan 2, 2024
1 parent d48ab90 commit 98c69b8
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 98c69b8

Please sign in to comment.