Skip to content

Commit

Permalink
Tidy
Browse files Browse the repository at this point in the history
  • Loading branch information
mattgperry committed Mar 5, 2023
1 parent 1d1afca commit f4e15a5
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 11 deletions.
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,12 @@ Framer Motion adheres to [Semantic Versioning](http://semver.org/).

Undocumented APIs should be considered internal and may change without warning.

## [10.0.2] 2023-03-05

### Fixed

- Fixing "Non-numeric `offset`" error in older browsers.

## [10.0.1] 2023-02-27

### Changed
Expand Down
22 changes: 11 additions & 11 deletions packages/framer-motion/src/animation/waapi/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,15 +14,15 @@ export function animateStyle(
times,
}: NativeAnimationOptions = {}
) {
return element.animate(
{ [valueName]: keyframes, ...(times && { offset: times }) },
{
delay,
duration,
easing: mapEasingToNativeEasing(ease),
fill: "both",
iterations: repeat + 1,
direction: repeatType === "reverse" ? "alternate" : "normal",
}
)
const keyframeOptions: PropertyIndexedKeyframes = { [valueName]: keyframes }
if (times) keyframeOptions.offset = times

return element.animate(keyframeOptions, {
delay,
duration,
easing: mapEasingToNativeEasing(ease),
fill: "both",
iterations: repeat + 1,
direction: repeatType === "reverse" ? "alternate" : "normal",
})
}

0 comments on commit f4e15a5

Please sign in to comment.