fix: issues in aniwatch.ts
This commit is contained in:
@@ -104,12 +104,12 @@ async function fetchEpisodes(
|
|||||||
.then(({ success, data }) => {
|
.then(({ success, data }) => {
|
||||||
if (!success || data.totalEpisodes === 0) {
|
if (!success || data.totalEpisodes === 0) {
|
||||||
console.error(
|
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;
|
return null;
|
||||||
}
|
}
|
||||||
const { totalEpisodes, episodes } = data;
|
|
||||||
|
|
||||||
|
const { episodes } = data;
|
||||||
return episodes.map<Episode>(({ episodeId, number, title }) => ({
|
return episodes.map<Episode>(({ episodeId, number, title }) => ({
|
||||||
id: episodeId,
|
id: episodeId,
|
||||||
number,
|
number,
|
||||||
|
|||||||
Reference in New Issue
Block a user