c2-mongoose 2.1.303 → 2.1.304

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.
@@ -283,7 +283,7 @@ var SearcherFlow = /** @class */ (function () {
283
283
  }
284
284
  else if (key.endsWith("IsEmpty")) {
285
285
  key = key.replace("IsEmpty", "");
286
- condition[key] = { $size: value ? 0 : { $gte: 1 } };
286
+ condition[key] = value ? { $size: 0 } : { $not: { $size: 0 } };
287
287
  }
288
288
  else {
289
289
  condition[key] = { $in: value };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "c2-mongoose",
3
- "version": "2.1.303",
3
+ "version": "2.1.304",
4
4
  "description": "Lib to make any search in database mongoose and use as basic crud",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",
@@ -259,7 +259,7 @@ class SearcherFlow<D> {
259
259
  condition[key] = { $nin: value };
260
260
  } else if (key.endsWith("IsEmpty")) {
261
261
  key = key.replace("IsEmpty", "");
262
- condition[key] = { $size: value ? 0 : { $gte: 1 } };
262
+ condition[key] = value ? { $size: 0 } : { $not: { $size: 0 } };
263
263
  } else {
264
264
  condition[key] = { $in: value };
265
265
  }