-
-
Notifications
You must be signed in to change notification settings - Fork 4.3k
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
Compilation fails when using two bind:this to array/object with same key #4686
Comments
I don't think it's a bug. Your variable is already binded to the DOM element corresponding to the first |
@Oreilles https://svelte.dev/repl/1e2c16c929a64890adeddf7fa9d65fa1?version=3.20.1 When using just one of the |
Oh, I missed that it was two different arrays |
The second REPL is far too complicated. This does however look like a bug. Very strange. |
related #4636 |
This has been fixed in 3.22.0 - https://svelte.dev/repl/5d29d37523c14015b3d79fa53d21e1dd?version=3.22.0 |
Compilation fails when using two bind:this to array/object with same key
Error msg:
Variable 'xxx' already initialised with a different value
Bug (version 3.20.1)
https://svelte.dev/repl/5d29d37523c14015b3d79fa53d21e1dd?version=3.20.1
Bug didn't exist in version 3.10.1 (haven't checked other versions tho):
https://svelte.dev/repl/5d29d37523c14015b3d79fa53d21e1dd?version=3.10.1
Note that this bug occurs when there is more than 1 component, if using 1 component it works.
Edit 1:
This bug occurs both when using destruction in
each
and without using itThe text was updated successfully, but these errors were encountered: