From 74686655782834bc57108e0c62ae51f220fe1044 Mon Sep 17 00:00:00 2001 From: David Jerleke Date: Thu, 1 Feb 2024 14:45:17 +0100 Subject: [PATCH] Bug fix for #720. --- packages/embla-carousel/src/components/Animations.ts | 1 + 1 file changed, 1 insertion(+) diff --git a/packages/embla-carousel/src/components/Animations.ts b/packages/embla-carousel/src/components/Animations.ts index 7c5289ec0..e7c4f9d28 100644 --- a/packages/embla-carousel/src/components/Animations.ts +++ b/packages/embla-carousel/src/components/Animations.ts @@ -41,6 +41,7 @@ export function Animations( } function animate(timeStamp: DOMHighResTimeStamp): void { + if (!animationFrame) return if (!lastTimeStamp) lastTimeStamp = timeStamp const elapsed = timeStamp - lastTimeStamp