Skip to content

Commit

Permalink
fix(useAnimate): immediate option set false not working (#3763)
Browse files Browse the repository at this point in the history
Co-authored-by: banruo <shl@dataqin.com>
Co-authored-by: Anthony Fu <github@antfu.me>
  • Loading branch information
3 people committed Feb 20, 2024
1 parent dee9ac4 commit 12c09a1
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion packages/core/useAnimate/index.ts
Expand Up @@ -248,7 +248,8 @@ export function useAnimate(
if (!isSupported.value || !el)
return

animate.value = el.animate(toValue(keyframes), animateOptions)
if (!animate.value)
animate.value = el.animate(toValue(keyframes), animateOptions)

if (commitStyles)
animate.value.commitStyles()
Expand Down

0 comments on commit 12c09a1

Please sign in to comment.