File tree Expand file tree Collapse file tree 1 file changed +6
-11
lines changed Expand file tree Collapse file tree 1 file changed +6
-11
lines changed Original file line number Diff line number Diff line change @@ -555,18 +555,13 @@ export function resolveOptions<T extends CommandOperationOptions>(
555555 let writeConcern = WriteConcern . fromOptions ( options ) ?? parent ?. writeConcern ;
556556 if ( writeConcern ) {
557557 if ( timeoutMS != null ) {
558- result . writeConcern = writeConcern ;
559- } else {
560- const matchOptions = new Set ( [ 'wtimeout' , 'wtimeoutMS' ] ) ;
561- const writeConcernKeys = Object . keys ( writeConcern ) ;
562- if ( writeConcernKeys . length > 2 && writeConcernKeys . some ( k => ! matchOptions . has ( k ) ) ) {
563- writeConcern = WriteConcern . fromOptions ( {
564- ...writeConcern ,
565- wtimeout : undefined ,
566- wtimeoutMS : undefined
567- } ) ;
568- }
558+ writeConcern = WriteConcern . fromOptions ( {
559+ ...writeConcern ,
560+ wtimeout : undefined ,
561+ wtimeoutMS : undefined
562+ } ) ;
569563 }
564+ result . writeConcern = writeConcern ;
570565 }
571566 }
572567
You can’t perform that action at this time.
0 commit comments