fix(comments): inline repliesOf() — {@const} placement
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:
@@ -296,10 +296,9 @@
|
|||||||
</form>
|
</form>
|
||||||
{/if}
|
{/if}
|
||||||
|
|
||||||
{@const replies = repliesOf(c.id)}
|
{#if repliesOf(c.id).length > 0}
|
||||||
{#if replies.length > 0}
|
|
||||||
<ul class="mt-3 ml-4 space-y-3 list-none p-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">
|
<li class="border-l-2 border-zinc-100 pl-3">
|
||||||
<div class="flex items-baseline gap-2 text-sm">
|
<div class="flex items-baseline gap-2 text-sm">
|
||||||
<strong class="font-medium">{r.author}</strong>
|
<strong class="font-medium">{r.author}</strong>
|
||||||
|
|||||||
Reference in New Issue
Block a user