{#each nodes as node (node.comment_view.comment.id)} {#if node.children?.length > 0} {/if} {#if node.comment_view.counts.child_count > 0 && node.children.length == 0} {/if} {/each}