We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 216f05d commit 80288e5Copy full SHA for 80288e5
packages/motion-dom/src/animation/GroupAnimation.ts
@@ -116,11 +116,13 @@ function getMax(
116
animations: GroupedAnimations,
117
propName: "iterationDuration" | "duration"
118
): number {
119
- return (
120
- Math.max(
121
- ...animations
122
- .map((animation) => animation[propName])
123
- .filter((value) => value !== null)
124
- ) || 0
125
- )
+ let max = 0
+
+ for (let i = 0; i < animations.length; i++) {
+ const value = animations[i][propName]
+ if (value !== null && value > max) {
+ max = value
+ }
126
127
+ return max
128
}
0 commit comments