0
Fork 0
mirror of https://github.com/withastro/astro.git synced 2025-02-17 22:44:24 -05:00

[ci] format

This commit is contained in:
Matthew Phillips 2023-12-14 15:21:57 +00:00 committed by astrobot-houston
parent 151bd429b1
commit 745294de94

View file

@ -13,7 +13,8 @@ type Events = 'astro:page-load' | 'astro:after-swap';
// which breaks Firefox.
const inBrowser = import.meta.env.SSR === false;
const pushState = (inBrowser && history.pushState.bind(history)) as typeof history.pushState;
const replaceState = (inBrowser && history.replaceState.bind(history)) as typeof history.replaceState;
const replaceState = (inBrowser &&
history.replaceState.bind(history)) as typeof history.replaceState;
// only update history entries that are managed by us
// leave other entries alone and do not accidently add state.
@ -24,7 +25,6 @@ export const updateScrollPosition = (positions: { scrollX: number; scrollY: numb
}
};
export const supportsViewTransitions = inBrowser && !!document.startViewTransition;
export const transitionEnabledOnThisPage = () =>