From 4401c64b75402dd4735f1eb95d2db7a2bd017a12 Mon Sep 17 00:00:00 2001 From: dawn Date: Thu, 3 Sep 2026 10:08:36 +0900 Subject: [PATCH] web/pulls: fix prop mutation and stale payload in review comments Signed-off-by: dawn --- web/src/lib/components/repo/pulls/PullReviewComment.svelte | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/web/src/lib/components/repo/pulls/PullReviewComment.svelte b/web/src/lib/components/repo/pulls/PullReviewComment.svelte index 7c51b4a7b..8d9d044e4 100644 --- a/web/src/lib/components/repo/pulls/PullReviewComment.svelte +++ b/web/src/lib/components/repo/pulls/PullReviewComment.svelte @@ -32,10 +32,8 @@ }: Props = $props(); async function submit(body: string) { - const newComment = { ...comment, body }; - await onedit(newComment); - comment = newComment; - comment.bodyHtml = renderMarkdown(body, markup); + const bodyHtml = renderMarkdown(body, markup); + await onedit({ ...comment, body, bodyHtml }); editing = false; } -- 2.51.2