c2-mongoose 2.1.287 → 2.1.288

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.
@@ -382,11 +382,7 @@ var SearcherFlow = /** @class */ (function () {
382
382
  _loop_1(clauseOr);
383
383
  }
384
384
  }
385
- var filtersFinal = {};
386
- if (andQueriesParam.length > 0) {
387
- // if (!filtersFinal.$or) filtersFinal.$or = []
388
- filtersFinal = __assign(__assign({}, filtersFinal), andQueriesParam);
389
- }
385
+ var filtersFinal = __assign({}, andQueriesParam);
390
386
  if (orPayload.length > 0) {
391
387
  if (!filtersFinal.$or)
392
388
  filtersFinal.$or = [];
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "c2-mongoose",
3
- "version": "2.1.287",
3
+ "version": "2.1.288",
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",
@@ -362,11 +362,7 @@ class SearcherFlow<D> {
362
362
  }
363
363
  }
364
364
 
365
- let filtersFinal = {} as any
366
- if (andQueriesParam.length > 0) {
367
- // if (!filtersFinal.$or) filtersFinal.$or = []
368
- filtersFinal = { ...filtersFinal, ...andQueriesParam }
369
- }
365
+ let filtersFinal = { ...andQueriesParam } as any
370
366
 
371
367
  if (orPayload.length > 0) {
372
368
  if (!filtersFinal.$or) filtersFinal.$or = []