Skip to content

Commit

Permalink
chore: revert debug.call changes
Browse files Browse the repository at this point in the history
  • Loading branch information
nodkz committed Dec 19, 2018
1 parent ab9d5e6 commit ff9d7b0
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/util/MongoBinary.js
Expand Up @@ -51,7 +51,7 @@ export default class MongoBinary {

let debug;
if (opts.debug) {
if (typeof opts.debug === 'function' && opts.debug.apply) {
if (typeof opts.debug === 'function' && opts.debug.apply && opts.debug.call) {
debug = opts.debug;
} else {
debug = console.log.bind(null);
Expand Down
2 changes: 1 addition & 1 deletion src/util/MongoBinaryDownload.js
Expand Up @@ -58,7 +58,7 @@ export default class MongoBinaryDownload {
};

if (debug) {
if (typeof debug === 'function' && debug.apply) {
if (typeof debug === 'function' && debug.apply && debug.call) {
this.debug = debug;
} else {
this.debug = console.log.bind(null);
Expand Down
6 changes: 5 additions & 1 deletion src/util/MongoInstance.js
Expand Up @@ -54,7 +54,11 @@ export default class MongodbInstance {
}

if (this.opts.instance && this.opts.instance.debug) {
if (typeof this.opts.instance.debug === 'function' && this.opts.instance.debug.apply) {
if (
typeof this.opts.instance.debug === 'function' &&
this.opts.instance.debug.apply &&
this.opts.instance.debug.call
) {
this.debug = this.opts.instance.debug;
} else {
this.debug = console.log.bind(null);
Expand Down

0 comments on commit ff9d7b0

Please sign in to comment.