Skip to content

Commit ea142bc

Browse files
authored
fix(WriteConcern): avoid throwing error when options is null (#2714)
1 parent 00b1374 commit ea142bc

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/write_concern.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@ export class WriteConcern {
7575
options?: WriteConcernOptions | WriteConcern | W,
7676
inherit?: WriteConcernOptions | WriteConcern
7777
): WriteConcern | undefined {
78-
if (typeof options === 'undefined') return undefined;
78+
if (options == null) return undefined;
7979
inherit = inherit ?? {};
8080
let opts;
8181
if (typeof options === 'string' || typeof options === 'number') {

0 commit comments

Comments
 (0)