From cb6c8b605582d27cbbadf20a4e22f78b0ef02e6c Mon Sep 17 00:00:00 2001
From: Fuwn <contact@fuwn.me>
Date: Wed, 30 Aug 2023 17:19:15 -0700
Subject: fix(manga): silly type fudging

---
 src/lib/List/Due/MangaList.svelte | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

(limited to 'src/lib/List/Due/MangaList.svelte')

diff --git a/src/lib/List/Due/MangaList.svelte b/src/lib/List/Due/MangaList.svelte
index 7a3bc68c..bf6a57ab 100644
--- a/src/lib/List/Due/MangaList.svelte
+++ b/src/lib/List/Due/MangaList.svelte
@@ -58,11 +58,11 @@
 		const chapterCounts = await Promise.all(chapterPromises);
 
 		finalMedia.forEach((m: Media, i) => {
-			m.episodes = chapterCounts[i];
+			m.episodes = chapterCounts[i] || -1337;
 		});
 
 		if (!displayUnresolved) {
-			finalMedia = finalMedia.filter((m: Media) => m.episodes !== null);
+			finalMedia = finalMedia.filter((m: Media) => m.episodes !== -1337);
 		}
 
 		finalMedia.sort((a: Media, b: Media) => {
@@ -78,7 +78,7 @@
 				array.findIndex((i) => {
 					return i.id === item.id;
 				}) === index &&
-				(item.episodes === null && displayUnresolved
+				(item.episodes === -1337 && displayUnresolved
 					? true
 					: (item.mediaListEntry?.progress || 0) <
 					  ($roundDownChapters === 'true' ? Math.floor(item.episodes) : item.episodes))
-- 
cgit v1.2.3

