{#if item != null}
{item}
{#each Object.entries(children) as [toplevel, subchildren], i} {#if subchildren}
{:else}
{/if} {/each}
{/if}