diff options
| author | Fuwn <[email protected]> | 2024-02-18 06:32:34 -0800 |
|---|---|---|
| committer | Fuwn <[email protected]> | 2024-02-18 06:32:45 -0800 |
| commit | f81259ee14232ccd742f5b34b4461ceee3d124a3 (patch) | |
| tree | 471eb1b1db23b578d59cd2529807e2171710ea03 /src/lib | |
| parent | feat(stream): filter on avatar click (diff) | |
| download | due.moe-f81259ee14232ccd742f5b34b4461ceee3d124a3.tar.xz due.moe-f81259ee14232ccd742f5b34b4461ceee3d124a3.zip | |
fix(stream): null check avatar
Diffstat (limited to 'src/lib')
| -rw-r--r-- | src/lib/Hololive/Stream.svelte | 8 |
1 files changed, 5 insertions, 3 deletions
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} |