Skip to content

Commit

Permalink
fix(animeEpisodeSrcs): fix bug where internal fn would call outer wra…
Browse files Browse the repository at this point in the history
…pper
  • Loading branch information
ghoshRitesh12 committed Aug 6, 2024
1 parent 21ab3ad commit 4ae88c3
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/scrapers/animeEpisodeSrcs.ts
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@ async function _getAnimeEpisodeSources(
} = await client.get(`${SRC_AJAX_URL}/v2/episode/sources?id=${serverId}`);
console.log("THE LINK: ", link);

return await getAnimeEpisodeSources(link, server);
return await _getAnimeEpisodeSources(link, server);
} catch (err: any) {
throw AniwatchError.wrapError(err, getAnimeEpisodeSources.name);
}
Expand All @@ -140,7 +140,7 @@ export async function getAnimeEpisodeSources(
ScrapedAnimeEpisodesSources & { anilistID: AnilistID; malID: MalID }
> {
try {
if (episodeId.trim() === "" || episodeId.indexOf("?ep=") === -1) {
if (episodeId === "" || episodeId.indexOf("?ep=") === -1) {
throw new AniwatchError(
"invalid anime episode id",
getAnimeEpisodeSources.name
Expand Down

0 comments on commit 4ae88c3

Please sign in to comment.