From da50f756d90da9fa66c60d4aec97c751bb2d2ff5 Mon Sep 17 00:00:00 2001
From: Fuwn <contact@fuwn.me>
Date: Thu, 28 Dec 2023 20:17:05 -0800
Subject: feat(hovercover): allow for no subs

---
 src/lib/Media/HoverCover.svelte | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

(limited to 'src/lib/Media/HoverCover.svelte')

diff --git a/src/lib/Media/HoverCover.svelte b/src/lib/Media/HoverCover.svelte
index a3aea9d6..d4009bec 100644
--- a/src/lib/Media/HoverCover.svelte
+++ b/src/lib/Media/HoverCover.svelte
@@ -2,17 +2,18 @@
 	import type { Media } from '$lib/AniList/media';
 	import type { SubsPleaseEpisode } from './Anime/Airing/Subtitled/subsPlease';
 
+	export let hovering = false;
 	export let hoveredItem: SubsPleaseEpisode | null = null;
 	export let hoveredMedia: Media | null = null;
 	export let imageStyle = '';
 </script>
 
-{#if hoveredItem}
+{#if hovering}
 	<img
 		class="hover-image show"
 		src={hoveredMedia
 			? hoveredMedia.coverImage.extraLarge
-			: `https://subsplease.org${hoveredItem.image_url}`}
+			: `https://subsplease.org${hoveredItem?.image_url}`}
 		alt="Media Cover"
 		style={imageStyle}
 	/>
-- 
cgit v1.2.3

