Skip to content

Commit c9b0152

Browse files
committed
refactor(sdam): revert null => undefined changes until 4.x
1 parent af9fb45 commit c9b0152

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

lib/core/sdam/topology.js

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -423,7 +423,7 @@ class Topology extends EventEmitter {
423423
const transaction = session && session.transaction;
424424

425425
if (isSharded && transaction && transaction.server) {
426-
callback(undefined, transaction.server);
426+
callback(null, transaction.server);
427427
return;
428428
}
429429

@@ -444,7 +444,7 @@ class Topology extends EventEmitter {
444444
transaction.pinServer(selectedServer);
445445
}
446446

447-
callback(undefined, selectedServer);
447+
callback(null, selectedServer);
448448
}
449449
);
450450
}
@@ -567,11 +567,11 @@ class Topology extends EventEmitter {
567567

568568
auth(credentials, callback) {
569569
if (typeof credentials === 'function') (callback = credentials), (credentials = null);
570-
if (typeof callback === 'function') callback(undefined, true);
570+
if (typeof callback === 'function') callback(null, true);
571571
}
572572

573573
logout(callback) {
574-
if (typeof callback === 'function') callback(undefined, true);
574+
if (typeof callback === 'function') callback(null, true);
575575
}
576576

577577
// Basic operation support. Eventually this should be moved into command construction
@@ -664,7 +664,7 @@ class Topology extends EventEmitter {
664664
isWriteCommand(cmd);
665665

666666
const cb = (err, result) => {
667-
if (!err) return callback(undefined, result);
667+
if (!err) return callback(null, result);
668668
if (!isRetryableError(err)) {
669669
return callback(err);
670670
}

0 commit comments

Comments
 (0)