Skip to content

Commit 5ca86a8

Browse files
committed
refactor: couple of minor improvements
1 parent 32fd472 commit 5ca86a8

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

lib/query.js

+3-3
Original file line numberDiff line numberDiff line change
@@ -2361,10 +2361,10 @@ Query.prototype._find = async function _find() {
23612361

23622362
// Separate options to pass down to `completeMany()` in case we need to
23632363
// set a session on the document
2364-
const completeManyOptions = Object.assign({}, {
2364+
const completeManyOptions = {
23652365
session: this && this.options && this.options.session || null,
23662366
lean: mongooseOptions.lean || null
2367-
});
2367+
};
23682368

23692369
const options = this._optionsForExec();
23702370

@@ -2382,7 +2382,7 @@ Query.prototype._find = async function _find() {
23822382
}
23832383

23842384
if (!mongooseOptions.populate) {
2385-
const versionKey = _this.schema.options.versionKey;
2385+
const versionKey = this.schema.options.versionKey;
23862386
if (mongooseOptions.lean && mongooseOptions.lean.versionKey === false && versionKey) {
23872387
docs.forEach((doc) => {
23882388
if (versionKey in doc) {

0 commit comments

Comments
 (0)