Index: lib/requestBlocker.js |
=================================================================== |
--- a/lib/requestBlocker.js |
+++ b/lib/requestBlocker.js |
@@ -189,17 +189,17 @@ |
let [filter, thirdParty] = matchRequest(url, type, docDomain, |
sitekey, specificOnly); |
let result; |
let rewrittenUrl; |
if (filter instanceof BlockingFilter) |
{ |
- if (filter.rewrite) |
+ if (typeof filter.rewrite == "string") |
{ |
rewrittenUrl = filter.rewriteUrl(details.url); |
// If no rewrite happened (error, different origin), we'll |
// return undefined in order to avoid an "infinite" loop. |
if (rewrittenUrl != details.url) |
result = {redirectUrl: rewrittenUrl}; |
} |
else |