From cd7a587e4132ff07f4875c8a6ccce2d5feed715c Mon Sep 17 00:00:00 2001 From: Matt Perry Date: Wed, 10 Apr 2024 16:06:46 +0200 Subject: [PATCH] Skipping duration: 0 animations --- .../framer-motion/src/animation/interfaces/motion-value.ts | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/packages/framer-motion/src/animation/interfaces/motion-value.ts b/packages/framer-motion/src/animation/interfaces/motion-value.ts index 569fd2f22e..f3dd44b999 100644 --- a/packages/framer-motion/src/animation/interfaces/motion-value.ts +++ b/packages/framer-motion/src/animation/interfaces/motion-value.ts @@ -87,8 +87,12 @@ export const animateMotionValue = let shouldSkip = false - if ((options as any).type === false) { + if ( + (options as any).type === false || + (options.duration === 0 && !options.repeatDelay) + ) { options.duration = 0 + if (options.delay === 0) { shouldSkip = true }