Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code

Unified Diff: test/filterClasses.js

Issue 29550662: Issue 5735 - Use JS Map instead of Object for property domains of Filter objects (Closed) Base URL: https://github.com/adblockplus/adblockpluscore.git
Patch Set: Created Sept. 20, 2017, 12:59 p.m.
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
View side-by-side diff with in-line comments
Download patch
« lib/filterClasses.js ('K') | « lib/filterClasses.js ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: test/filterClasses.js
diff --git a/test/filterClasses.js b/test/filterClasses.js
index 88dfac98b503f69a71b1bce6dc58619f68cf1c2c..377c6e1d0fdeedbed554637f37b4afe1202bf4d3 100644
--- a/test/filterClasses.js
+++ b/test/filterClasses.js
@@ -71,10 +71,10 @@ function serializeFilter(filter)
let domains = [];
if (filter.domains)
{
- for (let domain in filter.domains)
+ for (let [domain, isIncluded] of filter.domains)
{
if (domain != "")
- domains.push(filter.domains[domain] ? domain : "~" + domain);
+ domains.push(isIncluded ? domain : "~" + domain);
}
}
result.push("domains=" + domains.sort().join("|"));
« lib/filterClasses.js ('K') | « lib/filterClasses.js ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld