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

Unified Diff: lib/antiadblockInit.js

Issue 29643698: Issue 6201 - Fix the "Hide targeted messages?" notification (Closed)
Patch Set: Created Dec. 18, 2017, 3:32 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
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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);
}
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld