From 0bc71a759ebf50399b69f852db51fc19e3377984 Mon Sep 17 00:00:00 2001
From: Fuwn <contact@fuwn.me>
Date: Wed, 22 Nov 2023 23:59:39 -0800
Subject: fix(anime): remove time desync on outdated caches

---
 src/lib/List/Anime/UpcomingAnimeList.svelte | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

(limited to 'src/lib/List/Anime/UpcomingAnimeList.svelte')

diff --git a/src/lib/List/Anime/UpcomingAnimeList.svelte b/src/lib/List/Anime/UpcomingAnimeList.svelte
index 2b1d8a4b..fef79711 100644
--- a/src/lib/List/Anime/UpcomingAnimeList.svelte
+++ b/src/lib/List/Anime/UpcomingAnimeList.svelte
@@ -54,8 +54,7 @@
 
 		upcomingAnime.sort(
 			(a: Media, b: Media) =>
-				(a.nextAiringEpisode?.timeUntilAiring || 9999) -
-				(b.nextAiringEpisode?.timeUntilAiring || 9999)
+				(a.nextAiringEpisode?.airingAt || 9999) - (b.nextAiringEpisode?.airingAt || 9999)
 		);
 
 		if (!endTime) endTime = performance.now() - startTime;
-- 
cgit v1.2.3

