Index: lib/abp2blocklist.js |
diff --git a/lib/abp2blocklist.js b/lib/abp2blocklist.js |
index 0309dd21bc22fce2d68f896028bfba32c5d2715a..c86cb9d4b55725a8a44399bb853bcab7381d4521 100644 |
--- a/lib/abp2blocklist.js |
+++ b/lib/abp2blocklist.js |
@@ -273,7 +273,15 @@ function convertFilterAddRules(rules, filter, action, withResourceTypes) |
parseDomains(filter.domains, included, excluded); |
if (withResourceTypes) |
+ { |
trigger["resource-type"] = getResourceTypes(filter); |
+ |
+ // Rules with no resource types to match shouldn't match anything and |
Sebastian Noack
2016/08/20 13:42:50
Not sure whether this comment is necessary. Isn't
kzar
2016/08/22 12:44:36
Fair enough, removed.
|
+ // therefore shouldn't be created. |
+ if (trigger["resource-type"].length == 0) |
+ return; |
+ } |
+ |
if (filter.thirdParty != null) |
trigger["load-type"] = [filter.thirdParty ? "third-party" : "first-party"]; |