Skip to content

Commit

Permalink
fix: missed null parsedQuery case (#805)
Browse files Browse the repository at this point in the history
  • Loading branch information
ChrisPdgn authored Nov 21, 2023
1 parent 22c1e10 commit 21628e0
Showing 1 changed file with 1 addition and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -313,6 +313,7 @@ export class MongooseSchema extends SchemaAdapter<Model<any>> {
options?.userId,
options?.scope,
);
if (isNil(parsedQuery)) return null;
let finalQuery = this.model.findOne(parsedQuery!, options?.select);
if (options?.populate !== undefined && options?.populate !== null) {
finalQuery = this.populate(finalQuery, options?.populate);
Expand Down

0 comments on commit 21628e0

Please sign in to comment.