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 get Cannot read properties of undefined (reading '2') error at e2.id. Svelte attempts to access id in the current context.
This can be seen in the generated code,
Edit: Another observation, this only happens when the Identifier (id in this case) is present in the @each statement either in object destrcutring or as a key.
Describe the bug
Adding object property access,
obj.key
is I believe being treated as obj and key being separate variables.Consider this code,
I get
Cannot read properties of undefined (reading '2')
error ate2.id
. Svelte attempts to access id in the current context.This can be seen in the generated code,
Changing
e2.id
toe2["id"]
fixes this.Edit: Another observation, this only happens when the Identifier (
id
in this case) is present in the @each statement either in object destrcutring or as a key.Reproduction
REPL
Logs
No response
System Info
System: OS: macOS 12.0 CPU: (10) arm64 Apple M1 Pro Memory: 261.77 MB / 16.00 GB Shell: 5.8 - /bin/zsh Binaries: Node: 16.13.2 - /usr/local/bin/node npm: 8.1.2 - /usr/local/bin/npm Browsers: Chrome: 98.0.4758.109 Safari: 15.0 npmPackages: svelte: ^3.46.4 => 3.46.4
The text was updated successfully, but these errors were encountered: