File tree Expand file tree Collapse file tree 3 files changed +7
-3
lines changed Expand file tree Collapse file tree 3 files changed +7
-3
lines changed Original file line number Diff line number Diff 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 ) ;
Original file line number Diff line number Diff 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 ) ;
Original file line number Diff line number Diff 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 ) ;
You can’t perform that action at this time.
0 commit comments