diff options
Diffstat (limited to 'lib/consumet')
| -rw-r--r-- | lib/consumet/manga/getChapters.js | 4 | ||||
| -rw-r--r-- | lib/consumet/manga/getPage.js | 4 |
2 files changed, 4 insertions, 4 deletions
diff --git a/lib/consumet/manga/getChapters.js b/lib/consumet/manga/getChapters.js index 7a19bbc..ee6eabe 100644 --- a/lib/consumet/manga/getChapters.js +++ b/lib/consumet/manga/getChapters.js @@ -1,7 +1,7 @@ let API_URL; -API_URL = process.env.API_URI; +API_URL = process.env.API_URI || null || null; // remove / from the end of the url if it exists -if (API_URL.endsWith("/")) { +if (API_URL && API_URL.endsWith("/")) { API_URL = API_URL.slice(0, -1); } diff --git a/lib/consumet/manga/getPage.js b/lib/consumet/manga/getPage.js index 832c1d7..40f3fc2 100644 --- a/lib/consumet/manga/getPage.js +++ b/lib/consumet/manga/getPage.js @@ -1,7 +1,7 @@ let API_URL; -API_URL = process.env.API_URI; +API_URL = process.env.API_URI || null; // remove / from the end of the url if it exists -if (API_URL.endsWith("/")) { +if (API_URL && API_URL.endsWith("/")) { API_URL = API_URL.slice(0, -1); } |