mirror of
https://github.com/gorhill/uBlock.git
synced 2024-11-10 01:02:08 +01:00
Bail out early if missing required argument
This commit is contained in:
parent
596145ceb9
commit
6828e1c3b2
1 changed files with 2 additions and 1 deletions
|
@ -1675,6 +1675,7 @@
|
|||
if ( selector === '{{1}}' ) {
|
||||
selector = '';
|
||||
}
|
||||
if ( selector === '' ) { return; }
|
||||
let selectorCheck = '{{2}}';
|
||||
if ( selectorCheck === '{{2}}' ) {
|
||||
selectorCheck = '';
|
||||
|
@ -1721,7 +1722,7 @@
|
|||
const realFetch = self.fetch;
|
||||
self.fetch = new Proxy(self.fetch, {
|
||||
apply: function(target, thisArg, args) {
|
||||
if ( selector === '' || reUrl.test(urlFromArg(args[0])) === false ) {
|
||||
if ( reUrl.test(urlFromArg(args[0])) === false ) {
|
||||
return Reflect.apply(target, thisArg, args);
|
||||
}
|
||||
return realFetch(...args).then(realResponse =>
|
||||
|
|
Loading…
Reference in a new issue