From 60a91d6b1f238b9d95e86aa1706839945cdb65f3 Mon Sep 17 00:00:00 2001
From: Fuwn <contact@fuwn.me>
Date: Sun, 27 Aug 2023 01:37:15 -0700
Subject: feat(list): no double clean

---
 src/lib/List/Due/AnimeList.svelte | 4 ++++
 1 file changed, 4 insertions(+)

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

diff --git a/src/lib/List/Due/AnimeList.svelte b/src/lib/List/Due/AnimeList.svelte
index f9e7d11e..4580cdf1 100644
--- a/src/lib/List/Due/AnimeList.svelte
+++ b/src/lib/List/Due/AnimeList.svelte
@@ -17,6 +17,10 @@
 	});
 
 	const cleanMedia = (media: object[][], displayUnresolved: boolean) => {
+		if (media === undefined) {
+			return [];
+		}
+
 		const flattenedLists = flattenLists(media);
 		const releasingMedia = flattenedLists.filter((media: Media) => media['status'] == 'RELEASING');
 		const outdatedMedia = releasingMedia.filter((media: Media) => {
-- 
cgit v1.2.3

