diff --git a/src/controllers/episodes/getByAniListId/aniwatch.ts b/src/controllers/episodes/getByAniListId/aniwatch.ts index 348cf66..716ff81 100644 --- a/src/controllers/episodes/getByAniListId/aniwatch.ts +++ b/src/controllers/episodes/getByAniListId/aniwatch.ts @@ -104,12 +104,12 @@ async function fetchEpisodes( .then(({ success, data }) => { if (!success || data.totalEpisodes === 0) { console.error( - `Error trying to load episodes from aniwatch; aniListId: ${aniListId}, totalEpisodes: ${totalEpisodes}`, + `Error trying to load episodes from aniwatch; aniListId: ${aniListId}, totalEpisodes: ${data.totalEpisodes}`, ); return null; } - const { totalEpisodes, episodes } = data; + const { episodes } = data; return episodes.map(({ episodeId, number, title }) => ({ id: episodeId, number,