diff --git a/packages/astro/src/transitions/router.ts b/packages/astro/src/transitions/router.ts index 848fa38bb4db..5d07287b6f00 100644 --- a/packages/astro/src/transitions/router.ts +++ b/packages/astro/src/transitions/router.ts @@ -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' });