This repository was archived by the owner on Feb 4, 2022. It is now read-only.
File tree Expand file tree Collapse file tree 4 files changed +5
-5
lines changed Expand file tree Collapse file tree 4 files changed +5
-5
lines changed Original file line number Diff line number Diff line change @@ -607,15 +607,15 @@ Pool.prototype.connect = function() {
607
607
* @param {authResultCallback } callback A callback function
608
608
*/
609
609
Pool . prototype . auth = function ( credentials , callback ) {
610
- callback ( null , null ) ;
610
+ if ( typeof callback === 'function' ) callback ( null , null ) ;
611
611
} ;
612
612
613
613
/**
614
614
* Logout all users against a database
615
615
* @param {authResultCallback } callback A callback function
616
616
*/
617
617
Pool . prototype . logout = function ( dbName , callback ) {
618
- callback ( null , null ) ;
618
+ if ( typeof callback === 'function' ) callback ( null , null ) ;
619
619
} ;
620
620
621
621
/**
Original file line number Diff line number Diff line change @@ -300,7 +300,7 @@ Mongos.prototype.connect = function(options) {
300
300
* @param {authResultCallback } callback A callback function
301
301
*/
302
302
Mongos . prototype . auth = function ( credentials , callback ) {
303
- callback ( null , null ) ;
303
+ if ( typeof callback === 'function' ) callback ( null , null ) ;
304
304
} ;
305
305
306
306
function handleEvent ( self ) {
Original file line number Diff line number Diff line change @@ -940,7 +940,7 @@ ReplSet.prototype.connect = function(options) {
940
940
* @param {authResultCallback } callback A callback function
941
941
*/
942
942
ReplSet . prototype . auth = function ( credentials , callback ) {
943
- callback ( null , null ) ;
943
+ if ( typeof callback === 'function' ) callback ( null , null ) ;
944
944
} ;
945
945
946
946
/**
Original file line number Diff line number Diff line change @@ -505,7 +505,7 @@ Server.prototype.connect = function(options) {
505
505
* @param {authResultCallback } callback A callback function
506
506
*/
507
507
Server . prototype . auth = function ( credentials , callback ) {
508
- callback ( null , null ) ;
508
+ if ( typeof callback === 'function' ) callback ( null , null ) ;
509
509
} ;
510
510
511
511
/**
You can’t perform that action at this time.
0 commit comments