mirror of https://github.com/sveltejs/svelte
fix: ensure SvelteMap and SvelteSet work with generators in dev (#14103)
* fix: ensure SvelteMap and SvelteSet work with generators in dev * add test * better fix * better fix * better fix * better fixpull/14105/head
parent
535ea44b9d
commit
9883e7078c
@ -0,0 +1,5 @@
|
||||
---
|
||||
'svelte': patch
|
||||
---
|
||||
|
||||
fix: ensure SvelteMap and SvelteSet work with generators in dev
|
@ -0,0 +1,9 @@
|
||||
import { test } from '../../test';
|
||||
|
||||
export default test({
|
||||
compileOptions: {
|
||||
dev: true
|
||||
},
|
||||
|
||||
html: `1`
|
||||
});
|
@ -0,0 +1,14 @@
|
||||
<script>
|
||||
import { SvelteSet } from 'svelte/reactivity';
|
||||
|
||||
function *generator() {
|
||||
yield 1;
|
||||
}
|
||||
|
||||
let gen = new SvelteSet(generator());
|
||||
</script>
|
||||
|
||||
{#each gen as item}
|
||||
{item}
|
||||
{/each}
|
||||
|
Loading…
Reference in new issue