Skip to content

Commit 0563c2f

Browse files
committedDec 11, 2024
filter out null entries in list
list can appear in the form: ``` [null, null {...}] ``` when anilist api does not return `episodeCount` number of episodes. In the case of One Piece (ThaUnknown#568), only ep. 1122 is returned from the api, leaving 1121 null's in the list before the first entry with actual episode data
1 parent 6a8d0cb commit 0563c2f

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed
 

‎common/views/ViewAnime/EpisodeList.svelte

+1-1
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@
5858
const animeProgress = liveAnimeProgress(id)
5959
</script>
6060
61-
{#each episodeOrder ? episodeList : [...episodeList].reverse() as { episode, image, summary, rating, title, length, airdate, filler }}
61+
{#each episodeOrder ? episodeList.filter(e => e) : [...episodeList].reverse().filter(e => e) as { episode, image, summary, rating, title, length, airdate, filler }}
6262
{@const completed = !watched && userProgress >= episode}
6363
{@const target = userProgress + 1 === episode}
6464
{@const progress = !watched && ($animeProgress?.[episode] ?? 0)}

0 commit comments

Comments
 (0)
Please sign in to comment.