-
-
Notifications
You must be signed in to change notification settings - Fork 4.5k
svelte5: while binding this to none-existing property on desctructed object, svelte adds the property #12636
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
Binding to the each item and destructured properties is a Svelte 3 / 4 feature that is supposed to be gone in runes mode - it outputs an error.
I guess the |
I guess it should be in the breaking changes then (#11400). |
I don't think it qualifies as that since it still works in non-runes mode. |
Petition to rename |
Describe the bug
In JS this:
will result in:
{name: "test"}
It will not create the
lastname
property on the user.In svelte doing something similar:
will create:
It seems that it doesn't work for other binds tho, just for
bind:this
. This is a breaking change (bind:value={lastname}
works in svelte4 using the each block arguments to bind to), which I didn't find documented, maybe I'm blind, just pointing this out as well.Reproduction
Logs
No response
System Info
Severity
annoyance
The text was updated successfully, but these errors were encountered: