Skip to content

Commit a26b6d8

Browse files
authored
fix: overwrite #last_value when Spring is .set() with {instant: true} (#14656)
* fix: overwrite #last_value when Spring is with * run npx changeset
1 parent fb879dd commit a26b6d8

File tree

2 files changed

+6
-0
lines changed

2 files changed

+6
-0
lines changed

.changeset/shy-carpets-rescue.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
'svelte': patch
3+
---
4+
5+
Overwrite Spring.#last_value when using .set() with {instant: true}

packages/svelte/src/motion/spring.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -282,6 +282,7 @@ export class Spring {
282282
this.#task?.abort();
283283
this.#task = null;
284284
set(this.#current, set(this.#target, value));
285+
this.#last_value = value;
285286
return Promise.resolve();
286287
}
287288

0 commit comments

Comments
 (0)