Handle possible template comment in patch comment body

Signed-off-by: Sebastian Martinez <me@sebastinez.dev>
This commit is contained in:
Sebastian Martinez
2022-10-21 13:05:00 +02:00
parent e7a7baca5e
commit 4e0ffd8619
+6 -1
View File
@@ -28,6 +28,11 @@
}
});
const templateComment = `<!--
Please enter a comment message for your patch update. Leaving this
blank is also okay.
-->`;
$: source = profile?.avatar || comment.author.urn;
$: title =
profile?.name ||
@@ -91,7 +96,7 @@
<ReactionSelector on:select={selectReaction} />
</div>
<div class="card-body">
{#if comment.body === ""}
{#if comment.body.trim() === "" || comment.body.trim() === templateComment}
<span class="txt-missing">No description.</span>
{:else}
<Markdown content={comment.body} {getImage} />