diff --git a/frontend/src/helperComponents/Anime.svelte b/frontend/src/helperComponents/Anime.svelte index 49b903e..20a0531 100644 --- a/frontend/src/helperComponents/Anime.svelte +++ b/frontend/src/helperComponents/Anime.svelte @@ -398,15 +398,19 @@ setTimeout(() => submitSuccess.set(false), 2000); }; - let max = 999 + let max = 999; if (currentAniListAnime.data.MediaList.media.episodes !== 0) { - max = currentAniListAnime.data.MediaList.media.episodes + max = currentAniListAnime.data.MediaList.media.episodes; + } + if ( + currentAniListAnime.data.MediaList.media.episodes === 0 && + currentAniListAnime.data.MediaList.media.nextAiringEpisode.episode !== 0 + ) { + max = + currentAniListAnime.data.MediaList.media.nextAiringEpisode.episode - + 1; } - if (currentAniListAnime.data.MediaList.media.episodes === 0 && - currentAniListAnime.data.MediaList.media.nextAiringEpisode.episode !== 0) { - max = currentAniListAnime.data.MediaList.media.nextAiringEpisode.episode - 1 - }