diff options
author | 2023-07-27 12:44:15 +0000 | |
---|---|---|
committer | 2023-07-27 12:44:15 +0000 | |
commit | 30336bab94a77ac1e6f76a1f35a588393c0893c1 (patch) | |
tree | 4f29641347b275af135ff3494f4f65bd4478833c | |
parent | 267487e63ea0a4cfcb771c667a088afb16c62ba6 (diff) | |
download | astro-30336bab94a77ac1e6f76a1f35a588393c0893c1.tar.gz astro-30336bab94a77ac1e6f76a1f35a588393c0893c1.tar.zst astro-30336bab94a77ac1e6f76a1f35a588393c0893c1.zip |
[ci] format
-rw-r--r-- | packages/astro/components/ViewTransitions.astro | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/packages/astro/components/ViewTransitions.astro b/packages/astro/components/ViewTransitions.astro index 24552e10f..2df794679 100644 --- a/packages/astro/components/ViewTransitions.astro +++ b/packages/astro/components/ViewTransitions.astro @@ -163,15 +163,15 @@ const { fallback = 'animate' } = Astro.props as Props; history.pushState({ index: currentHistoryIndex }, '', link.href); } }); - window.addEventListener('popstate', ev => { + window.addEventListener('popstate', (ev) => { if (!transitionEnabledOnThisPage()) { // The current page doesn't haven't View Transitions, // respect that with a full page reload location.reload(); return; } - // hash change creates no state. - if(ev.state === null) { + // hash change creates no state. + if (ev.state === null) { history.replaceState({ index: currentHistoryIndex }, ''); ev.preventDefault(); return; |