-
-
Notifications
You must be signed in to change notification settings - Fork 4.5k
if inside keyed each - state is undefined #1202
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
Labels
Comments
I have a fix for this — PR inbound |
Rich-Harris
added a commit
that referenced
this issue
Mar 5, 2018
Rich-Harris
added a commit
that referenced
this issue
Mar 5, 2018
only apply key to keyed each block, not its children
This was referenced Mar 14, 2018
7nik
pushed a commit
to 7nik/svelte
that referenced
this issue
Apr 9, 2025
sync kit docs Co-authored-by: svelte-docs-bot[bot] <196124396+svelte-docs-bot[bot]@users.noreply.github.com> Co-authored-by: Rich Harris <[email protected]>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
https://svelte.technology/repl?version=1.56.1&gist=2b04ce441cdb48cb0d4277db0d94b9ff
If a keyed EachBlock contains an IfBlock, it is called only with
create_if_block(component, state)
, while in the function's definition it expectscreate_if_block(component, key, state)
.The each being keyed seems to be necessary for reproducing this, but I haven't looked much into what other situations this affects or what might be causing it.
The text was updated successfully, but these errors were encountered: