Skip to content

Commit ff9d7b0

Browse files
committed
chore: revert debug.call changes
1 parent ab9d5e6 commit ff9d7b0

File tree

3 files changed

+7
-3
lines changed

3 files changed

+7
-3
lines changed

src/util/MongoBinary.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ export default class MongoBinary {
5151

5252
let debug;
5353
if (opts.debug) {
54-
if (typeof opts.debug === 'function' && opts.debug.apply) {
54+
if (typeof opts.debug === 'function' && opts.debug.apply && opts.debug.call) {
5555
debug = opts.debug;
5656
} else {
5757
debug = console.log.bind(null);

src/util/MongoBinaryDownload.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ export default class MongoBinaryDownload {
5858
};
5959

6060
if (debug) {
61-
if (typeof debug === 'function' && debug.apply) {
61+
if (typeof debug === 'function' && debug.apply && debug.call) {
6262
this.debug = debug;
6363
} else {
6464
this.debug = console.log.bind(null);

src/util/MongoInstance.js

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,11 @@ export default class MongodbInstance {
5454
}
5555

5656
if (this.opts.instance && this.opts.instance.debug) {
57-
if (typeof this.opts.instance.debug === 'function' && this.opts.instance.debug.apply) {
57+
if (
58+
typeof this.opts.instance.debug === 'function' &&
59+
this.opts.instance.debug.apply &&
60+
this.opts.instance.debug.call
61+
) {
5862
this.debug = this.opts.instance.debug;
5963
} else {
6064
this.debug = console.log.bind(null);

0 commit comments

Comments
 (0)