diff --git a/src/runtime/motion/tweened.ts b/src/runtime/motion/tweened.ts index abbb3b1aa276..c802604c0e27 100644 --- a/src/runtime/motion/tweened.ts +++ b/src/runtime/motion/tweened.ts @@ -94,7 +94,12 @@ export function tweened(value?: T, defaults: Options = {}): Tweened { } = assign(assign({}, defaults), opts); if (duration === 0) { - store.set(target_value); + if (previous_task) { + previous_task.abort(); + previous_task = null; + } + + store.set(value = target_value); return Promise.resolve(); }