From 29d15f6d2d5ae1bf4a4612835cfdef4569e609b6 Mon Sep 17 00:00:00 2001 From: Martin Trapp <94928215+martrapp@users.noreply.github.com> Date: Tue, 2 Jan 2024 22:31:14 +0100 Subject: [PATCH] Fix history usage of PR 9563 --- packages/astro/src/transitions/router.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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' });