Index: test/filterClasses.js |
=================================================================== |
--- a/test/filterClasses.js |
+++ b/test/filterClasses.js |
@@ -66,20 +66,27 @@ |
{ |
result.push("disabled=" + filter.disabled); |
result.push("lastHit=" + filter.lastHit); |
result.push("hitCount=" + filter.hitCount); |
let domains = []; |
if (filter.domains) |
{ |
- for (let [domain, isIncluded] of filter.domains) |
+ if (typeof filter.domains == "string") |
+ { |
+ domains.push(filter.domains); |
+ } |
+ else |
{ |
- if (domain != "") |
- domains.push(isIncluded ? domain : "~" + domain); |
+ for (let [domain, isIncluded] of filter.domains) |
+ { |
+ if (domain != "") |
+ domains.push(isIncluded ? domain : "~" + domain); |
+ } |
} |
} |
result.push("domains=" + domains.sort().join("|")); |
if (filter instanceof RegExpFilter) |
{ |
result.push("regexp=" + filter.regexp.source); |
result.push("contentType=" + filter.contentType); |