[ci] format
This commit is contained in:
parent
267487e63e
commit
30336bab94
1 changed files with 3 additions and 3 deletions
|
@ -163,15 +163,15 @@ const { fallback = 'animate' } = Astro.props as Props;
|
||||||
history.pushState({ index: currentHistoryIndex }, '', link.href);
|
history.pushState({ index: currentHistoryIndex }, '', link.href);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
window.addEventListener('popstate', ev => {
|
window.addEventListener('popstate', (ev) => {
|
||||||
if (!transitionEnabledOnThisPage()) {
|
if (!transitionEnabledOnThisPage()) {
|
||||||
// The current page doesn't haven't View Transitions,
|
// The current page doesn't haven't View Transitions,
|
||||||
// respect that with a full page reload
|
// respect that with a full page reload
|
||||||
location.reload();
|
location.reload();
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
// hash change creates no state.
|
// hash change creates no state.
|
||||||
if(ev.state === null) {
|
if (ev.state === null) {
|
||||||
history.replaceState({ index: currentHistoryIndex }, '');
|
history.replaceState({ index: currentHistoryIndex }, '');
|
||||||
ev.preventDefault();
|
ev.preventDefault();
|
||||||
return;
|
return;
|
||||||
|
|
Loading…
Add table
Reference in a new issue