From edfea3680f32ac4fb128f0eb735e7eaa2b2f9ee1 Mon Sep 17 00:00:00 2001 From: Jonas Zohren <jonas.zohren@adesso.de> Date: Mon, 5 Apr 2021 18:23:47 +0200 Subject: [PATCH] Only show text if any text is given --- src/SingleDialogComponent.svelte | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 deletions(-) diff --git a/src/SingleDialogComponent.svelte b/src/SingleDialogComponent.svelte index c55da1e..413f801 100644 --- a/src/SingleDialogComponent.svelte +++ b/src/SingleDialogComponent.svelte @@ -81,16 +81,18 @@ sandbox="allow-same-origin allow-scripts allow-popups" src="https://video.oh14.de/videos/embed/{peertubeVideoId}?autoplay=1&title=0&warningTitle=0&peertubeLink=0" frameborder="0" - allowfullscreen /> {/if} -<div> - <Typewriter cascade interval={10} cursor={false}> - {#each text.split("\n") as para} - <p>{para}</p> - {/each} - </Typewriter> -</div> +{#if typeof text === "string" && text.length > 0} + <div> + <Typewriter cascade interval={10} cursor={false}> + {#each text.split("\n") as para} + <p>{para}</p> + {/each} + </Typewriter> + </div> +{/if} + <hr /> <div> {#each usableOptions as option} -- GitLab