Skip to content

Commit

Permalink
Only return 'normal' as the range when no value is given. (#185)
Browse files Browse the repository at this point in the history
Fixes the error “Can’t assign to property "rangeName": not an object”
  • Loading branch information
bramus authored Dec 24, 2023
1 parent 9eb24dd commit 945a8ac
Showing 1 changed file with 8 additions and 5 deletions.
13 changes: 8 additions & 5 deletions src/proxy-animation.js
Original file line number Diff line number Diff line change
Expand Up @@ -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:
// <start-name> <start-offset> <end-name> <end-offset>
// <name> --> <name> 0% <name> 100%
Expand Down

0 comments on commit 945a8ac

Please sign in to comment.