From 945a8ac308ec4b25b2e2642e5f4d34a7bf5d9271 Mon Sep 17 00:00:00 2001 From: Bramus Date: Sun, 24 Dec 2023 14:06:21 +0100 Subject: [PATCH] Only return 'normal' as the range when no value is given. (#185) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Fixes the error “Can’t assign to property "rangeName": not an object” --- src/proxy-animation.js | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/src/proxy-animation.js b/src/proxy-animation.js index 49d2c487..91acbff7 100644 --- a/src/proxy-animation.js +++ b/src/proxy-animation.js @@ -1799,14 +1799,17 @@ function parseTimelineRangeOffset(value, position) { // Parses a given animation-range value (string) function parseAnimationRange(value) { + if (!value) + return { + start: 'normal', + end: 'normal' + }; + const animationRange = { - start: 'normal', - end: 'normal' + start: { rangeName: 'cover', offset: CSS.percent(0) }, + end: { rangeName: 'cover', offset: CSS.percent(100) }, }; - if (!value) - return animationRange; - // Format: // // --> 0% 100%