From c07147ec6593b4849ae297f16c66f694c876a325 Mon Sep 17 00:00:00 2001 From: Spectralitree <72747870+Spectralitree@users.noreply.github.com> Date: Sat, 11 Dec 2021 19:10:22 +0100 Subject: [PATCH] fix: fix rendering crash when the description is empty --- src/lib/system/Body.svelte | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/lib/system/Body.svelte b/src/lib/system/Body.svelte index 66ee161e..589648b3 100644 --- a/src/lib/system/Body.svelte +++ b/src/lib/system/Body.svelte @@ -6,7 +6,12 @@ export let user; export let editMode: boolean; - $: htmlDescription = toHTML(user.description, {embed: true}); + let htmlDescription: string; + if (user.description) { + htmlDescription = toHTML(user.description, {embed: true}); + } else { + htmlDescription = "(no description)"; + } let created = moment(user.created).format("MMM D, YYYY");