Skip to content

Commit

Permalink
Merge pull request #47 from Exhabition/development
Browse files Browse the repository at this point in the history
fix: fetch.AbortError is not defined
  • Loading branch information
AurelicButter authored Mar 12, 2022
2 parents 6a72b3d + 96418ca commit b7ba4c9
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/fetcher.js
Original file line number Diff line number Diff line change
Expand Up @@ -141,7 +141,7 @@ module.exports = {

const response = await fetch("https://graphql.anilist.co", options)
.catch((error) => {
if (error instanceof fetch.AbortError) {
if (error.name === "AbortError") {
throw new Error(`ERROR: Request timed out after ${this.options.timeout}ms, is AniList up?`);
}
})
Expand Down

0 comments on commit b7ba4c9

Please sign in to comment.