From 87b7f8b9efca21d5da9c594977d7e165bfba7da3 Mon Sep 17 00:00:00 2001 From: lingbopro Date: Sun, 12 May 2024 20:16:05 +0800 Subject: [PATCH] =?UTF-8?q?v1.1.1=20=E7=B4=A7=E6=80=A5=E4=BF=AE=E5=A4=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- main.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/main.js b/main.js index 7c63a34..e64a305 100644 --- a/main.js +++ b/main.js @@ -267,7 +267,7 @@ try { }) .then(() => { IPs = sortArrayByItemProperty(IPs, "host"); - newRecords = diff ? [] : JSON.parse(JSON.stringify(records)); + let newRecords = diff ? [] : JSON.parse(JSON.stringify(records)); // PR #1 把这玩意的定义整没了... IPs.forEach(function (currentValue, index) { if (checkIPv4(currentValue.ip)) { let recordIndex = getHostsRecordIndexByHost( @@ -287,7 +287,7 @@ try { console.log(`${appName}: This address (${currentValue.host}) may not exist, if you are sure it does not exist, please report an issue at https://github.com/lingbopro/easy-github-hosts/issues`); } }); - newHostsContent = genHosts(newRecords); + let newHostsContent = genHosts(newRecords); // PR #1 把这玩意的定义也整没了,我真就 if (debug || noedit) { console.debug(`${appName}: ${(debug && !noedit) ? "(debug) " : ""}${diff ? "Differences between new and old HOSTS file" : "New HOSTS file content"}:`); console.debug(`${appName}: ${(debug && !noedit) ? "(debug) " : ""}============================================================`);