c2-mongoose 2.1.309 → 2.1.310

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.
@@ -115,7 +115,7 @@ var SearcherFlow = /** @class */ (function () {
115
115
  }
116
116
  if ((0, Utils_1.isEmpty)(options.paging) && this.pageable) {
117
117
  stagesPaging.push({ $match: this.filters });
118
- stagesPaging.push(this.buildPaginationData());
118
+ stagesPaging = __spreadArray(__spreadArray([], stagesItems, true), this.buildPaginationData(), true);
119
119
  }
120
120
  else {
121
121
  stagesPaging = __spreadArray(__spreadArray([], stagesPaging, true), options.paging, true);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "c2-mongoose",
3
- "version": "2.1.309",
3
+ "version": "2.1.310",
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",
@@ -79,7 +79,7 @@ class SearcherFlow<D> {
79
79
 
80
80
  if (isEmpty(options.paging) && this.pageable) {
81
81
  stagesPaging.push({ $match: this.filters })
82
- stagesPaging.push(this.buildPaginationData())
82
+ stagesPaging = [...stagesItems, ...this.buildPaginationData()]
83
83
  } else {
84
84
  stagesPaging = [...stagesPaging, ...options.paging]
85
85
  }