Skip to content

Commit

Permalink
fix: retain RegExp caller context
Browse files Browse the repository at this point in the history
- 782 gz / 649 br
  • Loading branch information
lukeed committed Dec 14, 2018
1 parent a1544da commit 53f5169
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/index.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ function prefetcher(url) {
function isIgnored(node, filter) {
return Array.isArray(filter)
? filter.some(x => isIgnored(node, x))
: (filter.test || filter)(node.href, node);
: (filter.test || filter).call(filter, node.href, node);
}

/**
Expand Down

0 comments on commit 53f5169

Please sign in to comment.