Skip to content

Commit 0818bd8

Browse files
committed
clean
1 parent a5362ff commit 0818bd8

File tree

2 files changed

+2
-10
lines changed

2 files changed

+2
-10
lines changed

lib/operations/connect.js

+1-10
Original file line numberDiff line numberDiff line change
@@ -647,11 +647,7 @@ function createUnifiedOptions(finalOptions, options) {
647647
// This way, `fromOptions` will warn once if `options` is using deprecated write concern options
648648
const optionsWriteConcern = WriteConcern.fromOptions(options);
649649
if (optionsWriteConcern) {
650-
finalOptions.writeConcern = Object.assign(
651-
{},
652-
finalOptions.writeConcern,
653-
WriteConcern.fromOptions(options)
654-
);
650+
finalOptions.writeConcern = Object.assign({}, finalOptions.writeConcern, optionsWriteConcern);
655651
}
656652

657653
return finalOptions;
@@ -781,11 +777,6 @@ function transformUrlOptions(_object) {
781777
object.wTimeoutMS = undefined;
782778
}
783779

784-
if (object.journal) {
785-
object.j = object.journal;
786-
object.journal = undefined;
787-
}
788-
789780
if (_object.srvHost) {
790781
object.srvHost = _object.srvHost;
791782
}

lib/write_concern.js

+1
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,7 @@ class WriteConcern {
4242
* @param {number} [options.wtimeout] **Deprecated** Use `options.writeConcern` instead
4343
* @param {boolean} [options.j] **Deprecated** Use `options.writeConcern` instead
4444
* @param {boolean} [options.fsync] **Deprecated** Use `options.writeConcern` instead
45+
* @param {object|WriteConcern} [options.writeConcern] Specify write concern settings.
4546
* @return {WriteConcern}
4647
*/
4748
static fromOptions(options) {

0 commit comments

Comments
 (0)