diff --git a/src/write_concern.ts b/src/write_concern.ts index b2ab9262fce..e73c3a548ff 100644 --- a/src/write_concern.ts +++ b/src/write_concern.ts @@ -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') {