Skip to content

Commit

Permalink
fix(mquery): update conditions for selecting if the input is a collec…
Browse files Browse the repository at this point in the history
…tion
  • Loading branch information
hasezoey committed Feb 18, 2023
1 parent d8b08bc commit a4115c1
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/mquery.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ const debug = require('debug')('mquery');
* query.setOptions({ collection: moduleCollection })
* query.where('age').gte(21).exec(callback);
*
* @param {Object} [criteria]
* @param {Object} [criteria] criteria for the query OR the collection instance to use
* @param {Object} [options]
* @api public
*/
Expand Down Expand Up @@ -55,7 +55,7 @@ function Query(criteria, options) {
}

if (criteria) {
if (criteria.find && criteria.remove && criteria.update) {
if (criteria.find && criteria.deleteOne && criteria.updateOne) {
// quack quack!
this.collection(criteria);
} else {
Expand Down

0 comments on commit a4115c1

Please sign in to comment.