Skip to content

Commit 421fe6e

Browse files
authored
fix: correct typeof check in checkSupportedServer (#2690)
1 parent 2492dd2 commit 421fe6e

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/cmap/connect.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ function checkSupportedServer(ismaster: Document, options: ConnectionOptions) {
4141
ismaster.maxWireVersion >= MIN_SUPPORTED_WIRE_VERSION;
4242
const serverVersionLowEnough =
4343
ismaster &&
44-
(typeof ismaster.maxWireVersion === 'number' || ismaster.maxWireVersion instanceof Int32) &&
44+
(typeof ismaster.minWireVersion === 'number' || ismaster.minWireVersion instanceof Int32) &&
4545
ismaster.minWireVersion <= MAX_SUPPORTED_WIRE_VERSION;
4646

4747
if (serverVersionHighEnough) {

0 commit comments

Comments
 (0)