From 07e6fb4cad540489d44dbd322337d5929eea6b6e Mon Sep 17 00:00:00 2001
From: Fuwn <contact@fuwn.net>
Date: Fri, 22 May 2026 06:41:33 +0000
Subject: fix(lists): show placeholder while animeLists is undefined

Before DueAnimeList/UpcomingAnimeList's onMount assigns the promise,
{#await undefined} fell through to {:then media=undefined}, which
cleanMedia turned into an empty array and the list rendered "No anime
to display". The auto-snapshot then captured [] into previousAnimeList,
making every subsequent pending state skip the skeleton. Gate the await
on animeLists being defined so the placeholder shows until the fetch
actually starts.
---
 src/lib/List/Anime/AnimeListTemplate.svelte | 2 ++
 1 file changed, 2 insertions(+)

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

diff --git a/src/lib/List/Anime/AnimeListTemplate.svelte b/src/lib/List/Anime/AnimeListTemplate.svelte
index 5bc46e5c..538889b4 100644
--- a/src/lib/List/Anime/AnimeListTemplate.svelte
+++ b/src/lib/List/Anime/AnimeListTemplate.svelte
@@ -58,6 +58,8 @@ onMount(async () => {
 
 {#if !$subsPlease && !dummy}
   <PlaceholderList count={lastListSize} {title} />
+{:else if !animeLists}
+  <PlaceholderList count={lastListSize} {title} />
 {:else}
   {#await animeLists}
     {#if previousAnimeList}
-- 
cgit v1.2.3

