fix: remove invalid [ character

This commit is contained in:
Ming Di Leom 2022-11-02 08:13:10 +00:00
parent 9346733739
commit fed8bb18f5
No known key found for this signature in database
GPG Key ID: 32D3E28E96A695E8
1 changed files with 1 additions and 1 deletions

View File

@ -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)
}