You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
svelte/test/runtime/samples/each-block-recursive-with-f.../main.svelte

14 lines
251 B

<script>
let a = () => true;
export let data = [{ foo: [{ foo: [{bar: "one"}, {bar: "two"}] }] }];
</script>
{#each data as datum}
{#if datum.foo && a()}
<p>OK</p>
<svelte:self data={datum.foo}/>
{:else}
<pre>{datum.bar}</pre>
{/if}
{/each}