| Index: lib/filterClasses.js |
| =================================================================== |
| --- a/lib/filterClasses.js |
| +++ b/lib/filterClasses.js |
| @@ -714,23 +714,20 @@ |
| * @param {string} [docDomain] domain name of the document that loads the URL |
| * @param {boolean} [thirdParty] should be true if the URL is a third-party |
| * request |
| * @param {string} [sitekey] public key provided by the document |
| * @return {boolean} true in case of a match |
| */ |
| matches(location, typeMask, docDomain, thirdParty, sitekey) |
| { |
| - if (this.contentType & typeMask && |
| - (this.thirdParty == null || this.thirdParty == thirdParty) && |
| - this.isActiveOnDomain(docDomain, sitekey) && this.regexp.test(location)) |
| - { |
| - return true; |
| - } |
| - return false; |
| + return (this.contentType & typeMask) != 0 && |
|
Manish Jethani
2018/09/04 13:46:06
The first condition here needs to evaluate to a bo
Jon Sonesen
2018/09/05 14:16:38
Yeah, I see what you did there. Stylistically I pr
|
| + (this.thirdParty == null || this.thirdParty == thirdParty) && |
| + this.isActiveOnDomain(docDomain, sitekey) && |
| + this.regexp.test(location); |
| } |
| }); |
| /** |
| * Creates a RegExp filter from its text representation |
| * @param {string} text same as in Filter() |
| * @return {Filter} |
| */ |