From 42fdf6c903b9cd9b85c5571a21bd20bff9e2c92f Mon Sep 17 00:00:00 2001 From: SukkaW Date: Thu, 15 Jun 2023 10:34:52 +0800 Subject: [PATCH] Fix: parse filter --- Build/lib/parse-filter.js | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/Build/lib/parse-filter.js b/Build/lib/parse-filter.js index 4218737a..4a7167ef 100644 --- a/Build/lib/parse-filter.js +++ b/Build/lib/parse-filter.js @@ -39,7 +39,7 @@ async function processDomainLists(domainListsUrl) { || line.startsWith('\r') || line.startsWith('\n') ) { - return; + continue; } const domainToAdd = line.trim(); @@ -52,7 +52,7 @@ async function processDomainLists(domainListsUrl) { domainSets.add(domainToAdd); } - return [...domainSets]; + return domainSets; } /** @@ -71,10 +71,10 @@ async function processHosts(hostsUrl, includeAllSubDomain = false) { const rl = await fetchRemoteTextAndCreateReadlineInterface(hostsUrl); for await (const line of rl) { if (line.includes('#')) { - return; + continue; } if (line.startsWith(' ') || line.startsWith('\r') || line.startsWith('\n') || line.trim() === '') { - return; + continue; } const [, ...domains] = line.split(' '); const _domain = domains.join(' ').trim(); @@ -96,7 +96,7 @@ async function processHosts(hostsUrl, includeAllSubDomain = false) { console.timeEnd(` - processHosts: ${hostsUrl}`); - return [...domainSets]; + return domainSets; } /**