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
I have an array let arr = $state(['a', 'b', 'c']). When I arr.splice(1, 1), $inspect(arr) first shows me ['a', 'c', 'c'] before showing the correct version, which is ['a', 'c'].
This was raised in #13494 before and was fixed, but it apparently has made a comeback.
This is kinda of expected since it's how the browser "apply" slice...we could probably use the same trick Rich used in #15073 but i'd say let's wait to see if #15069 is merged first so that we can reuse that code.
Describe the bug
I have an array
let arr = $state(['a', 'b', 'c'])
. When Iarr.splice(1, 1)
,$inspect(arr)
first shows me['a', 'c', 'c']
before showing the correct version, which is['a', 'c']
.This was raised in #13494 before and was fixed, but it apparently has made a comeback.
Reproduction
https://svelte.dev/playground/0955025b01db4aa99efcd441351b33e9?version=5.19.2
Logs
System Info
Severity
annoyance
The text was updated successfully, but these errors were encountered: