Skip to content

Commit

Permalink
fix(WriteConcern): avoid throwing error when options is null (#2714)
Browse files Browse the repository at this point in the history
  • Loading branch information
vkarpov15 authored and ljhaywar committed Nov 9, 2021
1 parent 8c929a4 commit 06abe94
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/write_concern.ts
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ export class WriteConcern {
options?: WriteConcernOptions | WriteConcern | W,
inherit?: WriteConcernOptions | WriteConcern
): WriteConcern | undefined {
if (typeof options === 'undefined') return undefined;
if (options == null) return undefined;
inherit = inherit ?? {};
let opts;
if (typeof options === 'string' || typeof options === 'number') {
Expand Down

0 comments on commit 06abe94

Please sign in to comment.