diff --git a/lib/fetcher.js b/lib/fetcher.js index 5428741..930232b 100644 --- a/lib/fetcher.js +++ b/lib/fetcher.js @@ -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?`); } })