Skip to content

Commit e5f272f

Browse files
authored
Merge pull request #138 from mongoosejs/vkarpov15/remove-ducktyping
BREAKING CHANGE: remove support for `mquery(collection)`, first param is always filter
2 parents f94d1a8 + 3aba080 commit e5f272f

2 files changed

Lines changed: 61 additions & 70 deletions

File tree

lib/mquery.js

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -55,12 +55,7 @@ function Query(criteria, options) {
5555
}
5656

5757
if (criteria) {
58-
if (criteria.find && criteria.deleteOne && criteria.updateOne) {
59-
// quack quack!
60-
this.collection(criteria);
61-
} else {
62-
this.find(criteria);
63-
}
58+
this.find(criteria);
6459
}
6560
}
6661

0 commit comments

Comments
 (0)