From fed8bb18f5549410581df997613f13dd7f0b6750 Mon Sep 17 00:00:00 2001 From: Ming Di Leom <2809763-curben@users.noreply.gitlab.com> Date: Wed, 2 Nov 2022 08:13:10 +0000 Subject: [PATCH] fix: remove invalid [ character --- src/script.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/script.js b/src/script.js index 3cd56e5..bfa439f 100644 --- a/src/script.js +++ b/src/script.js @@ -19,7 +19,7 @@ const f = async () => { const domains = new Set() for (const { url } of domainsArray) { - const parsedUrl = new URL(url.replace(/\*\./g, '')) + const parsedUrl = new URL(url.replace(/\*\./g, '').replace(/^\[/, '')) const domain = parsedUrl.hostname.replace(/\\/g, '').replace(/^www\./, '') domains.add(domain) }