Skip to content

Commit

Permalink
Revert "fix(model): make exists() consistenty return the query"
Browse files Browse the repository at this point in the history
This reverts commit 92b8c5f.
  • Loading branch information
vkarpov15 committed Dec 30, 2021
1 parent df94638 commit 6a5c154
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions lib/model.js
Original file line number Diff line number Diff line change
Expand Up @@ -1090,6 +1090,9 @@ Model.exists = function exists(filter, options, callback) {
return query.exec(callback);
}
options = options || {};
if (!options.explain) {
return query.then(doc => !!doc);
}

return query;
};
Expand Down

0 comments on commit 6a5c154

Please sign in to comment.