{#if subChapters.length > 0} {#if !onServer}
{/if} {#if isOpen || onServer}
{#each subChapters || [] as subChapter, subIndex}
{#if showChapterNumbers} {parentIndex}.{subIndex + 1}. {/if} {subChapter.heading}
{/each}
{/if} {/if}