You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the bug
When a tweened store is changed with a duration : 0 set it early-outs and immediately sets the value after #4766, but that PR missed an important detail. When the store is tweening, it needs to have the value variable updated each time it's set like it does for the early-out if value == null. The change #4766 doesn't do that, so whenever that codepath is taken value gets out of date and any later tweens are broken.
Describe the bug
When a
tweened
store is changed with aduration : 0
set it early-outs and immediately sets the value after #4766, but that PR missed an important detail. When the store is tweening, it needs to have thevalue
variable updated each time it's set like it does for the early-out ifvalue == null
. The change #4766 doesn't do that, so whenever that codepath is takenvalue
gets out of date and any later tweens are broken.value === null
pathsvelte/src/runtime/motion/tweened.ts
Lines 79 to 82 in c9020d3
duration === 0
pathsvelte/src/runtime/motion/tweened.ts
Lines 96 to 99 in c9020d3
Line 97 needs to be
To Reproduce
https://svelte.dev/repl/b1c9c041de7048f2bd733f686d0d9482?version=3.22.2
Expected behavior
Store would immediately and synchronously get set to 10, then start tweening from 10 to 20.
Actual behavior
Store immediately set to 10, then starts tweening from 0 to 20.
Information about your Svelte project:
Severity
This breaks any tweened updates to the store after a value is set with
duration : 0
, so that seems pretty bad to me.Additional context
I'm sorry I'm a bad person and introduced this bug. 😞
The text was updated successfully, but these errors were encountered: