From 718eed704ad1864cdedf0704d5020af1439671cd Mon Sep 17 00:00:00 2001 From: Sandeep Dilip Date: Sun, 3 Mar 2024 16:00:18 +0000 Subject: [PATCH] [ci] format --- packages/astro/src/transitions/router.ts | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/packages/astro/src/transitions/router.ts b/packages/astro/src/transitions/router.ts index 480ce7da2bc6..02e2d69dfd20 100644 --- a/packages/astro/src/transitions/router.ts +++ b/packages/astro/src/transitions/router.ts @@ -625,7 +625,7 @@ if (inBrowser) { if ('onscrollend' in window) addEventListener('scrollend', onScrollEnd); else { // Keep track of state between intervals - let intervalId: number | undefined, lastY: number, lastX: number, lastIndex: State["index"]; + let intervalId: number | undefined, lastY: number, lastX: number, lastIndex: State['index']; const scrollInterval = () => { // Check the index to see if a popstate event was fired if (lastIndex !== history.state?.index) { @@ -642,20 +642,20 @@ if (inBrowser) { return; } else { // Update vars with current positions - lastY = scrollY, lastX = scrollX; + (lastY = scrollY), (lastX = scrollX); } - } + }; // We can't know when or how often scroll events fire, so we'll just use them to start intervals addEventListener( - "scroll", + 'scroll', () => { if (intervalId !== undefined) return; - lastIndex = history.state.index, lastY = scrollY, lastX = scrollX; + (lastIndex = history.state.index), (lastY = scrollY), (lastX = scrollX); intervalId = window.setInterval(scrollInterval, 50); }, { passive: true } ); - }; + } } for (const script of document.scripts) { script.dataset.astroExec = '';