From 4422d1ebd343f95b580a3f761443baf6c989cbaa Mon Sep 17 00:00:00 2001 From: Vahid Farid Date: Fri, 31 Mar 2023 17:01:38 +0330 Subject: [PATCH] Update worker.js --- worker.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/worker.js b/worker.js index a094aff..7462560 100644 --- a/worker.js +++ b/worker.js @@ -130,7 +130,7 @@ export default { ipList = {...cleanIPPerOperator} Object.keys(ipList).forEach((k) => !ipList[k].length && delete ipList[k]); } - if (!Object.keys(ipList)) { + if (!Object.keys(ipList).length) { ipList = {COM: ['']} } @@ -155,7 +155,7 @@ export default { finalConfigList = finalConfigList.concat(getMultipleRandomElements(ssConfigList, maxPerType)) } - return new Response(b2a(finalConfigList.join("\n"))); + return new Response(btoa(finalConfigList.join("\n"))); } else { var url = new URL(request.url) var newUrl = new URL("https://" + url.pathname.replace(/^\/|\/$/g, ""))