From 817f6589779569b1124791e5c7de70c3334ac9e0 Mon Sep 17 00:00:00 2001 From: Peter Meier Date: Tue, 28 Apr 2026 11:49:27 +0200 Subject: [PATCH] =?UTF-8?q?fix(comments):=20inline=20repliesOf()=20?= =?UTF-8?q?=E2=80=94=20`{@const}`=20placement?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Svelte rejected `{@const replies = repliesOf(c.id)}` because it sat inside `
  • ` 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 --- src/lib/components/Comments.svelte | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/lib/components/Comments.svelte b/src/lib/components/Comments.svelte index 8c5872a..3510cdd 100644 --- a/src/lib/components/Comments.svelte +++ b/src/lib/components/Comments.svelte @@ -296,10 +296,9 @@ {/if} - {@const replies = repliesOf(c.id)} - {#if replies.length > 0} + {#if repliesOf(c.id).length > 0}
      - {#each replies as r (r.id)} + {#each repliesOf(c.id) as r (r.id)}
    • {r.author}