fix(comments): inline repliesOf() — {@const} placement
Deploy / verify (push) Successful in 47s
Deploy / deploy (push) Successful in 1m3s

Svelte rejected `{@const replies = repliesOf(c.id)}` because it sat
inside `<li>` rather than directly under `{#each}`. The Gitea deploy
typecheck (`svelte-check --threshold error`) failed on this, leaving
the previous Cusdis bundle live. Inlining the call costs one extra
filter per render — fine here.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
This commit is contained in:
Peter Meier
2026-04-28 11:49:27 +02:00
parent febc027e6b
commit 817f658977
+2 -3
View File
@@ -296,10 +296,9 @@
</form>
{/if}
{@const replies = repliesOf(c.id)}
{#if replies.length > 0}
{#if repliesOf(c.id).length > 0}
<ul class="mt-3 ml-4 space-y-3 list-none p-0">
{#each replies as r (r.id)}
{#each repliesOf(c.id) as r (r.id)}
<li class="border-l-2 border-zinc-100 pl-3">
<div class="flex items-baseline gap-2 text-sm">
<strong class="font-medium">{r.author}</strong>