Skip to content

Commit

Permalink
[ci] format
Browse files Browse the repository at this point in the history
  • Loading branch information
matthewp authored and astrobot-houston committed Jul 27, 2023
1 parent 267487e commit 30336ba
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions packages/astro/components/ViewTransitions.astro
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit 30336ba

Please sign in to comment.