mirror of https://github.com/sveltejs/svelte
parent
3de0e4bca4
commit
a93242a85e
@ -0,0 +1,6 @@
|
|||||||
|
export default {
|
||||||
|
compileOptions: {
|
||||||
|
dev: true
|
||||||
|
},
|
||||||
|
error: `Svelte does not allow Sets or Maps in an {#each} block. Use [...arg.values()] instead.`
|
||||||
|
};
|
@ -0,0 +1,7 @@
|
|||||||
|
<script>
|
||||||
|
const foo = new Set([1,2,3])
|
||||||
|
</script>
|
||||||
|
|
||||||
|
{#each foo as item}
|
||||||
|
<div>{item}</div>
|
||||||
|
{/each}
|
@ -0,0 +1,6 @@
|
|||||||
|
export default {
|
||||||
|
compileOptions: {
|
||||||
|
dev: true
|
||||||
|
},
|
||||||
|
error: `Svelte needs an array-like value for the {#each} block. You can spread your iterable into an array instead, e.g. [...iterable]`
|
||||||
|
};
|
@ -0,0 +1,7 @@
|
|||||||
|
<script>
|
||||||
|
const foo = new Set([1,2,3])
|
||||||
|
</script>
|
||||||
|
|
||||||
|
{#each foo.values() as item}
|
||||||
|
<div>{item}</div>
|
||||||
|
{/each}
|
Loading…
Reference in new issue