mirror of
https://github.com/gorhill/uBlock.git
synced 2024-11-10 09:07:54 +01:00
Arrow functions are not instanceof Function
But their `typeof` is `function`, so use this instead to detect whether an argument is a function which can be called. Related feedback: - https://www.reddit.com/r/uBlockOrigin/comments/qyx7en/
This commit is contained in:
parent
9b1f59c8b2
commit
374d4800e5
1 changed files with 2 additions and 1 deletions
|
@ -21,6 +21,7 @@
|
|||
|
||||
// https://www.reddit.com/r/uBlockOrigin/comments/ghjqph/
|
||||
// https://github.com/NanoMeow/QuickReports/issues/3717
|
||||
// https://www.reddit.com/r/uBlockOrigin/comments/qyx7en/
|
||||
|
||||
(function() {
|
||||
'use strict';
|
||||
|
@ -30,7 +31,7 @@
|
|||
}.bind();
|
||||
const apstag = {
|
||||
fetchBids: function(a, b) {
|
||||
if ( b instanceof Function ) {
|
||||
if ( typeof b === 'function' ) {
|
||||
b([]);
|
||||
}
|
||||
},
|
||||
|
|
Loading…
Reference in a new issue