mirror of https://github.com/sveltejs/svelte
Internals: Scheduler: Fix infinite loop in flush (#4316)
parent
bf006a43e5
commit
8e245dc30e
@ -0,0 +1 @@
|
||||
Child
|
@ -0,0 +1,6 @@
|
||||
export default {
|
||||
test({ assert, component }) {
|
||||
const { count } = component;
|
||||
assert.deepEqual(count, 1);
|
||||
}
|
||||
};
|
@ -0,0 +1,16 @@
|
||||
<script>
|
||||
import { onMount } from 'svelte';
|
||||
import Child from './Child.svelte';
|
||||
|
||||
let root;
|
||||
export let count = 0;
|
||||
|
||||
onMount(() => {
|
||||
if (count < 5) {
|
||||
count++;
|
||||
new Child({ target: root });
|
||||
}
|
||||
});
|
||||
</script>
|
||||
|
||||
<div bind:this={root}></div>
|
Loading…
Reference in new issue