c2-mongoose 2.1.60 → 2.1.61

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.
@@ -169,7 +169,7 @@ var SearchFlow = /** @class */ (function () {
169
169
  { $sort: this.sort },
170
170
  { $skip: (this.page - 1) * this.limit },
171
171
  { $limit: this.limit },
172
- { $project: this.projection }
172
+ this.projection ? { $project: this.projection } : undefined
173
173
  ], options.pipelines, true);
174
174
  return [4 /*yield*/, model.aggregate([
175
175
  {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "c2-mongoose",
3
- "version": "2.1.60",
3
+ "version": "2.1.61",
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",
@@ -95,7 +95,7 @@ abstract class SearchFlow {
95
95
  { $sort: this.sort },
96
96
  { $skip: (this.page - 1) * this.limit },
97
97
  { $limit: this.limit },
98
- { $project: this.projection },
98
+ this.projection ? { $project: this.projection } : undefined,
99
99
  ...options.pipelines
100
100
  ]
101
101