diff --git a/packages/astro/components/ViewTransitions.astro b/packages/astro/components/ViewTransitions.astro index 7f4a6098865a..4f43171f977b 100644 --- a/packages/astro/components/ViewTransitions.astro +++ b/packages/astro/components/ViewTransitions.astro @@ -179,7 +179,7 @@ const { fallback = 'animate' } = Astro.props as Props; // If there are no animations, go ahead and swap on next tick // This is necessary because we do not know if there are animations. // The setTimeout is a fallback in case there are none. - var timeout = setTimeout(() => !isAnimating && fallbackSwap()); + let timeout = setTimeout(() => !isAnimating && fallbackSwap()); } else { swap(); }