aboutsummaryrefslogtreecommitdiff
path: root/lib/consumet
diff options
context:
space:
mode:
authorFactiven <[email protected]>2023-10-24 20:27:32 +0700
committerFactiven <[email protected]>2023-10-24 20:27:32 +0700
commit451e4dffd000169e7113aa3275e4acaf7f1fbbbc (patch)
tree035edf0d05e2f6878be745c326935aba3d821636 /lib/consumet
parentUpdate v4.2.1 (diff)
downloadmoopa-4.2.2.tar.xz
moopa-4.2.2.zip
Update v4.2.2v4.2.2
Diffstat (limited to 'lib/consumet')
-rw-r--r--lib/consumet/manga/getChapters.js4
-rw-r--r--lib/consumet/manga/getPage.js4
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);
}