mirror of https://github.com/sveltejs/svelte
disable loop protection inside generators (#4716)
parent
edeeb05a6c
commit
3d811311b7
@ -0,0 +1,6 @@
|
|||||||
|
export default {
|
||||||
|
compileOptions: {
|
||||||
|
dev: true,
|
||||||
|
loopGuardTimeout: 1,
|
||||||
|
},
|
||||||
|
};
|
@ -0,0 +1,14 @@
|
|||||||
|
<script>
|
||||||
|
const it = gen();
|
||||||
|
it.next();
|
||||||
|
|
||||||
|
setTimeout(() => {
|
||||||
|
it.next();
|
||||||
|
}, 20)
|
||||||
|
|
||||||
|
function* gen() {
|
||||||
|
while (true) {
|
||||||
|
yield;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</script>
|
Loading…
Reference in new issue