Skip to content

Commit e40a090

Browse files
committed
address code review comments
1 parent 9f4def3 commit e40a090

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

lib/query.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -2293,9 +2293,9 @@ Query.prototype.mongooseOptions = function(v) {
22932293

22942294
Query.prototype._castConditions = function() {
22952295
let sanitizeFilterOpt = undefined;
2296-
if (this.model != null && this.model.db.options?.sanitizeFilter != null) {
2296+
if (this.model?.db.options?.sanitizeFilter != null) {
22972297
sanitizeFilterOpt = this.model.db.options.sanitizeFilter;
2298-
} else if (this.model != null && this.model.base.options?.sanitizeFilter != null) {
2298+
} else if (this.model?.base.options?.sanitizeFilter != null) {
22992299
sanitizeFilterOpt = this.model.base.options.sanitizeFilter;
23002300
} else {
23012301
sanitizeFilterOpt = this._mongooseOptions.sanitizeFilter;

0 commit comments

Comments
 (0)