Skip to content

Commit

Permalink
fix: overwrite #last_value when Spring is .set() with `{instant: tr…
Browse files Browse the repository at this point in the history
…ue}` (#14656)

* fix: overwrite #last_value when Spring is  with

* run npx changeset
  • Loading branch information
grieben authored Dec 10, 2024
1 parent fb879dd commit a26b6d8
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
5 changes: 5 additions & 0 deletions .changeset/shy-carpets-rescue.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'svelte': patch
---

Overwrite Spring.#last_value when using .set() with {instant: true}
1 change: 1 addition & 0 deletions packages/svelte/src/motion/spring.js
Original file line number Diff line number Diff line change
Expand Up @@ -282,6 +282,7 @@ export class Spring {
this.#task?.abort();
this.#task = null;
set(this.#current, set(this.#target, value));
this.#last_value = value;
return Promise.resolve();
}

Expand Down

0 comments on commit a26b6d8

Please sign in to comment.