From 6a2daa79953e0c07462de29e5603d5e19f619e46 Mon Sep 17 00:00:00 2001 From: Rushil Perera Date: Tue, 29 Oct 2024 07:49:18 -0400 Subject: [PATCH] fix: issues in aniwatch.ts --- src/controllers/episodes/getByAniListId/aniwatch.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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,