Skip to content

Commit 945a8ac

Browse files
authored
Only return 'normal' as the range when no value is given. (#185)
Fixes the error “Can’t assign to property "rangeName": not an object”
1 parent 9eb24dd commit 945a8ac

1 file changed

Lines changed: 8 additions & 5 deletions

File tree

src/proxy-animation.js

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1799,14 +1799,17 @@ function parseTimelineRangeOffset(value, position) {
17991799

18001800
// Parses a given animation-range value (string)
18011801
function parseAnimationRange(value) {
1802+
if (!value)
1803+
return {
1804+
start: 'normal',
1805+
end: 'normal'
1806+
};
1807+
18021808
const animationRange = {
1803-
start: 'normal',
1804-
end: 'normal'
1809+
start: { rangeName: 'cover', offset: CSS.percent(0) },
1810+
end: { rangeName: 'cover', offset: CSS.percent(100) },
18051811
};
18061812

1807-
if (!value)
1808-
return animationRange;
1809-
18101813
// Format:
18111814
// <start-name> <start-offset> <end-name> <end-offset>
18121815
// <name> --> <name> 0% <name> 100%

0 commit comments

Comments
 (0)