mirror of https://github.com/sveltejs/svelte
fix: throw validation error when binding to each argument in runes mode (#10441)
closes #10437pull/10446/head
parent
49bfb6b1d6
commit
456cf843d2
@ -0,0 +1,5 @@
|
||||
---
|
||||
"svelte": patch
|
||||
---
|
||||
|
||||
fix: throw validation error when binding to each argument in runes mode
|
@ -0,0 +1,9 @@
|
||||
import { test } from '../../test';
|
||||
|
||||
export default test({
|
||||
error: {
|
||||
code: 'invalid-each-assignment',
|
||||
message:
|
||||
"Cannot reassign or bind to each block argument in runes mode. Use the array and index variables instead (e.g. 'array[i] = value' instead of 'entry = value')"
|
||||
}
|
||||
});
|
@ -0,0 +1,7 @@
|
||||
<script>
|
||||
let arr = $state([1,2,3]);
|
||||
</script>
|
||||
|
||||
{#each arr as value}
|
||||
<input bind:value>
|
||||
{/each}
|
Loading…
Reference in new issue