mirror of
https://github.com/withastro/astro.git
synced 2025-01-27 22:19:04 -05:00
Fix history usage of PR 9563 (#9581)
This commit is contained in:
parent
d48ab90fb4
commit
98c69b89cc
1 changed files with 1 additions and 1 deletions
|
@ -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' });
|
||||
|
|
Loading…
Add table
Reference in a new issue