Update RouteEntity.cpp

This commit is contained in:
parhelia512 2025-10-01 19:12:25 +08:00 committed by GitHub
parent 90498afeb7
commit 47d10b1fa2
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -584,13 +584,13 @@ namespace Configs {
MW_show_log("Aborted generating routing section, an error has occurred");
return {};
}
if (Configs::dataStore->adblock_enable && rule_json["action"] == "route") {
if (!added_adblock && Configs::dataStore->adblock_enable && rule_json["action"] == "route") {
res += createAdblockRule();
added_adblock = true;
}
res += rule_json;
}
if (Configs::dataStore->adblock_enable && !added_adblock)
if (!added_adblock && Configs::dataStore->adblock_enable)
res += createAdblockRule();
return res;