mirror of https://github.com/sveltejs/svelte
disallow duplicate each keys in dev mode (#4303)
parent
5107ad38b6
commit
1a343b165c
@ -0,0 +1,7 @@
|
||||
export default {
|
||||
compileOptions: {
|
||||
dev: true
|
||||
},
|
||||
|
||||
error: `Cannot have duplicate keys in a keyed each`
|
||||
};
|
@ -0,0 +1,7 @@
|
||||
<script>
|
||||
const array = [1, 2, 3, 1];
|
||||
</script>
|
||||
|
||||
{#each array as item (item)}
|
||||
{item}
|
||||
{/each}
|
Loading…
Reference in new issue