c2-mongoose 2.1.324 → 2.1.325

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.
@@ -80,14 +80,11 @@ var SearcherV2Flow = /** @class */ (function () {
80
80
  facet.paging = pipelineFacetPaging;
81
81
  }
82
82
  facet.items = pipelineFacetItems;
83
- return [4 /*yield*/, model.aggregate([
84
- {
85
- $match: MatchFlowItem_1.default.exec(params.mainFilter, model)
86
- },
83
+ return [4 /*yield*/, model.aggregate(__spreadArray(__spreadArray([], MatchFlowItem_1.default.exec(params.mainFilter, model), true), [
87
84
  {
88
85
  $facet: facet
89
86
  }
90
- ])];
87
+ ], false))];
91
88
  case 1:
92
89
  result = _a.sent();
93
90
  ret = {};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "c2-mongoose",
3
- "version": "2.1.324",
3
+ "version": "2.1.325",
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",
@@ -41,9 +41,7 @@ class SearcherV2Flow {
41
41
  facet.items = pipelineFacetItems
42
42
 
43
43
  let result = await model.aggregate([
44
- {
45
- $match: MatchFlowItem.exec(params.mainFilter, model)
46
- },
44
+ ...MatchFlowItem.exec(params.mainFilter, model),
47
45
  {
48
46
  $facet: facet
49
47
  }