@ewb/mongoose-query 1.1.15 → 1.1.16

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/lib/QueryModel.js CHANGED
@@ -205,7 +205,7 @@ export class QueryModel {
205
205
  const array = doc[key];
206
206
  if (array && Array.isArray(array)) {
207
207
  if (id) {
208
- return (array.find((x) => x._id.matchId(id)) || null);
208
+ return (array.find((x) => x._id.equals(id)) || null);
209
209
  }
210
210
  return array[0] || null;
211
211
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ewb/mongoose-query",
3
- "version": "1.1.15",
3
+ "version": "1.1.16",
4
4
  "type": "module",
5
5
  "description": "Parse queries and params to mongoose search. Strips dangerous keys and set corrects options with help of query values.",
6
6
  "main": "./lib/index.js",