{#each children as child} {#if Array.isArray(child.children)} {:else} {/if} {/each}