From f81259ee14232ccd742f5b34b4461ceee3d124a3 Mon Sep 17 00:00:00 2001
From: Fuwn <contact@fuwn.me>
Date: Sun, 18 Feb 2024 06:32:34 -0800
Subject: fix(stream): null check avatar

---
 src/lib/Hololive/Stream.svelte | 8 +++++---
 1 file changed, 5 insertions(+), 3 deletions(-)

(limited to 'src/lib/Hololive/Stream.svelte')

diff --git a/src/lib/Hololive/Stream.svelte b/src/lib/Hololive/Stream.svelte
index 18ce158b..e9057352 100644
--- a/src/lib/Hololive/Stream.svelte
+++ b/src/lib/Hololive/Stream.svelte
@@ -34,9 +34,11 @@
 			>{:else if new Date(live.time).getTime() < Date.now()}
 			<span class="ended">{$locale().hololive.ended}</span>{:else}
 			<span class="upcoming">{$locale().hololive.upcoming}</span>{/if}]
-		<a href={root(`/hololive/${encodeURIComponent(live.streamer)}`)}>
-			<img src={icon} alt="Profile" class="stream-icon" />
-		</a>
+		{#if icon}
+			<a href={root(`/hololive/${encodeURIComponent(live.streamer)}`)}>
+				<img src={icon} alt="Avatar" class="stream-icon" />
+			</a>
+		{/if}
 		<b>{live.streamer}</b> <span class="opaque">|</span>
 		{$locale().hololive.dateFormatter(new Date(live.time))}
 		{#if live.guests.length > 0}
-- 
cgit v1.2.3

