fix: issues in aniwatch.ts

This commit is contained in:
2024-10-29 07:49:18 -04:00
parent da7c843e72
commit 6a2daa7995

View File

@@ -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<Episode>(({ episodeId, number, title }) => ({
id: episodeId,
number,