fix: issues in aniwatch.ts
This commit is contained in:
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user