-
-
Notifications
You must be signed in to change notification settings - Fork 4.6k
Closed
Description
Describe the bug
The following code examples (which work properly with svelte 4) produce errors with Svelte 5,
{#each ["a", "b"] as result, i (i)}
<div>{result}</div>
{/each}
{#each ["a", "b"] as result, i (i)}
<div>{i}</div>
{/each}
<!-- This (with only one element) doesn't produce any errors. -->
{#each ["a"] as result, i (i)}
<div>{result}</div>
{/each}
Reproduction
Logs
No response
System Info
System:
OS: macOS 14.2
CPU: (12) arm64 Apple M2 Pro
Memory: 213.45 MB / 16.00 GB
Shell: 5.9 - /bin/zsh
Binaries:
Node: 21.2.0 - /opt/homebrew/bin/node
Yarn: 1.22.21 - /opt/homebrew/bin/yarn
npm: 6.14.16 - /opt/homebrew/bin/npm
pnpm: 8.10.5 - /opt/homebrew/bin/pnpm
bun: 1.0.3 - ~/.bun/bin/bun
Browsers:
Chrome: 119.0.6045.159
Chrome Canary: 121.0.6145.0
Safari: 17.2
Severity
annoyance
Metadata
Metadata
Assignees
Labels
No labels