mirror of
https://github.com/gorhill/uBlock.git
synced 2024-11-07 03:12:33 +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
@ -21,6 +21,7 @@
|
|||||||
|
|
||||||
// https://www.reddit.com/r/uBlockOrigin/comments/ghjqph/
|
// https://www.reddit.com/r/uBlockOrigin/comments/ghjqph/
|
||||||
// https://github.com/NanoMeow/QuickReports/issues/3717
|
// https://github.com/NanoMeow/QuickReports/issues/3717
|
||||||
|
// https://www.reddit.com/r/uBlockOrigin/comments/qyx7en/
|
||||||
|
|
||||||
(function() {
|
(function() {
|
||||||
'use strict';
|
'use strict';
|
||||||
@ -30,7 +31,7 @@
|
|||||||
}.bind();
|
}.bind();
|
||||||
const apstag = {
|
const apstag = {
|
||||||
fetchBids: function(a, b) {
|
fetchBids: function(a, b) {
|
||||||
if ( b instanceof Function ) {
|
if ( typeof b === 'function' ) {
|
||||||
b([]);
|
b([]);
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
Loading…
Reference in New Issue
Block a user