Index: lib/antiadblockInit.js |
diff --git a/lib/antiadblockInit.js b/lib/antiadblockInit.js |
index 197d0fc3e8fe7c443ca28d779e6617b56bfdb60a..1419d48db365edb3138fc64f73e0fe84305955ea 100644 |
--- a/lib/antiadblockInit.js |
+++ b/lib/antiadblockInit.js |
@@ -46,12 +46,12 @@ exports.initAntiAdblockNotification = function initAntiAdblockNotification() |
let urlFilters = []; |
for (let filter of subscription.filters) |
{ |
- if (filter instanceof ActiveFilter) |
+ if (filter instanceof ActiveFilter && filter.domains) |
{ |
- for (let domain in filter.domains) |
+ for (let domain of filter.domains.keys()) |
Wladimir Palant
2017/12/19 11:36:05
You need the value as well, so better:
for (let
kzar
2017/12/19 12:28:00
Done.
|
{ |
let urlFilter = "||" + domain + "^$document"; |
- if (domain && filter.domains[domain] && |
+ if (domain && filter.domains.has(domain) && |
Wladimir Palant
2017/12/19 11:36:05
That's pointless, you already know that domain exi
kzar
2017/12/19 12:28:00
Whoops, Done.
|
urlFilters.indexOf(urlFilter) == -1) |
urlFilters.push(urlFilter); |
} |