c2-mongoose 2.1.225 → 2.1.226

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.
@@ -100,8 +100,8 @@ var SearcherFlow = /** @class */ (function () {
100
100
  }
101
101
  // stagesItems.push({ $sort: this.sort })
102
102
  if (this.pageable === true) {
103
- stagesItems.push({ $skip: ((this.page - 1) * this.limit) || 0 });
104
- stagesItems.push({ $limit: this.limit });
103
+ stagesItems.push({ $skip: Number(((this.page - 1) * this.limit) || 0) });
104
+ stagesItems.push({ $limit: Number(this.limit) });
105
105
  }
106
106
  stagesPaging = [];
107
107
  if ((0, Utils_1.isNotEmpty)(options.pipelines)) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "c2-mongoose",
3
- "version": "2.1.225",
3
+ "version": "2.1.226",
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",
@@ -67,8 +67,8 @@ class SearcherFlow<D> {
67
67
 
68
68
  // stagesItems.push({ $sort: this.sort })
69
69
  if (this.pageable === true) {
70
- stagesItems.push({ $skip: ((this.page - 1) * this.limit) || 0 })
71
- stagesItems.push({ $limit: this.limit })
70
+ stagesItems.push({ $skip: Number(((this.page - 1) * this.limit) || 0) })
71
+ stagesItems.push({ $limit: Number(this.limit) })
72
72
  }
73
73
 
74
74