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

Unified Diff: lib/elemHide.js

Issue 29356322: Issue 4501 - Fix treatment of element hiding filters with filter key 0 (Closed) Base URL: https://hg.adblockplus.org/adblockpluscore
Patch Set: Created Oct. 7, 2016, 10:11 a.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 | test/elemHide.js » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: lib/elemHide.js
===================================================================
--- a/lib/elemHide.js
+++ b/lib/elemHide.js
@@ -132,17 +132,17 @@ var ElemHide = exports.ElemHide =
if (!(selector in exceptions))
exceptions[selector] = [];
exceptions[selector].push(filter);
// If this is the first exception for a previously unconditionally
// applied element hiding selector we need to take care to update the
// lookups.
let filterKey = filterKeyBySelector[selector];
- if (filterKey)
+ if (typeof filterKey != "undefined")
{
this._addToFiltersByDomain(filterKey, filterByKey[filterKey]);
delete filterKeyBySelector[selector];
unconditionalSelectors = unconditionalFilterKeys = null;
}
knownExceptions[filter.text] = true;
}
« no previous file with comments | « no previous file | test/elemHide.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld