Describe the bug
By using the new {const} thing, and having an item with the animate directive rigt below it, we get the error:
"An element that uses the animate: directive must be the only child of a keyed {#each ...} block"
If I then change to the "old" {@const} the error goes away
PS: I'm not sure how to classify the severity, the app doesn't build with it, and that's my first time creating a bug report lol
Reproduction
<script>
const array = [{ id: 1, name: 'a'}]
</script>
{#each array as item (item.id)}
{const iName = item.name}
<div animate:flip>
<p>{iName}</p>
</div>
{/each}
Playground link: https://svelte.dev/playground/0100487a59e6457597df4d2c90f0f733?version=latest
Logs
System Info
Packages:
svelte: 5.56.1
svelte-check: 4.5.0
Extension:
svelte.svelte-vscode: 110.1.0
Severity
annoyance
Describe the bug
By using the new
{const}thing, and having an item with the animate directive rigt below it, we get the error:"An element that uses the
animate:directive must be the only child of a keyed{#each ...}block"If I then change to the "old"
{@const}the error goes awayPS: I'm not sure how to classify the severity, the app doesn't build with it, and that's my first time creating a bug report lol
Reproduction
Playground link: https://svelte.dev/playground/0100487a59e6457597df4d2c90f0f733?version=latest
Logs
System Info
Severity
annoyance