-
-
Notifications
You must be signed in to change notification settings - Fork 4k
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
Svelte 5: #each
index used as key causes error
#9408
Milestone
Comments
Isn't this the same as an indexed array? Why key it at all? |
I know, it's redundant. |
dummdidumm
pushed a commit
that referenced
this issue
Nov 14, 2023
Fixes #9408. Ensures that if we have a key that matches the index, that we fallback to using an indexed each block.
This is not fixed.
|
This is a dev mode only issue. The production build is exactly the same (the implemented fix turns it into an indexed each). This is currently still falsely added in dev mode: $.validate_each_keys(() => [1, 2, 3], (item) => {
return $.get(i);
}); |
Fixed in #9641. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Describe the bug
Presumably because the key function only gets passed the item.
Works in v4 so probably shouldn't cause errors in v5, even if it doesn't really do anything.
(Found by Thiagolino8 on Discord.)
Reproduction
REPL
Logs
No response
System Info
Severity
annoyance
The text was updated successfully, but these errors were encountered: