Fix 2 bugs in exceptions handling

This commit is contained in:
ilyaigpetrov 2021-01-18 13:58:30 +00:00
parent 14f32b4d13
commit 0b13cb1dd0

View File

@ -387,7 +387,7 @@
const ifIncluded = pacMods.included && pacMods.included.length; const ifIncluded = pacMods.included && pacMods.included.length;
const ifExcluded = pacMods.excluded && pacMods.excluded.length; const ifExcluded = pacMods.excluded && pacMods.excluded.length;
const ifManualExceptions = ifIncluded || ifExcluded; const ifManualExceptions = ifIncluded || ifExcluded;
const finalExceptions = {}; let finalExceptions = {};
if (pacMods.ifProxyMoreDomains) { if (pacMods.ifProxyMoreDomains) {
finalExceptions = pacMods.moreDomains.reduce((acc, tld) => { finalExceptions = pacMods.moreDomains.reduce((acc, tld) => {
@ -419,7 +419,7 @@
/******/ if (!isHostInDomain(domain, ifWild)) { /******/ if (!isHostInDomain(domain, ifWild)) {
/******/ return maxWeight; /******/ return maxWeight;
/******/ } /******/ }
const len = domain.length; let len = domain.length;
if (ifWild) { if (ifWild) {
len = len === 0 ? len : (len - 2)*2 - 1; len = len === 0 ? len : (len - 2)*2 - 1;
} else { } else {