diff options
Diffstat (limited to 'background_scripts')
| -rw-r--r-- | background_scripts/exclusions.coffee | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/background_scripts/exclusions.coffee b/background_scripts/exclusions.coffee index a8d65d62..12d86f41 100644 --- a/background_scripts/exclusions.coffee +++ b/background_scripts/exclusions.coffee @@ -23,9 +23,9 @@ root.Exclusions = Exclusions = rules: Settings.get("exclusionRules") - # Merge the matching rules for URL, or null. - getRule: (url) -> - matching = (rule for rule in @rules when url.match(RegexpCache.get(rule.pattern))) + # Merge the matching rules for URL, or null. If rules are provided, match against those. + getRule: (url, rules=@rules) -> + matching = (rule for rule in rules when rule.pattern and url.match(RegexpCache.get(rule.pattern))) # An absolute exclusion rule (with no passKeys) takes priority. for rule in matching return rule unless rule.passKeys |
