c2-mongoose 2.1.233 → 2.1.234

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.
@@ -22,6 +22,9 @@ var BuildSelectSingleFlowItem = /** @class */ (function () {
22
22
  var projection = {};
23
23
  for (var _i = 0, selects_1 = selects; _i < selects_1.length; _i++) {
24
24
  var field = selects_1[_i];
25
+ if ((0, Utils_1.isEmpty)(field)) {
26
+ continue;
27
+ }
25
28
  var include = field.startsWith("-") ? false : true;
26
29
  field = field.replace("-", "");
27
30
  projection = __assign(__assign({}, projection), this.buildProjectionNested(model, projection, field, include));
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "c2-mongoose",
3
- "version": "2.1.233",
3
+ "version": "2.1.234",
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",
@@ -11,6 +11,9 @@ class BuildSelectSingleFlowItem {
11
11
 
12
12
  let projection: any = {}
13
13
  for (var field of selects) {
14
+ if (isEmpty(field)) {
15
+ continue
16
+ }
14
17
  let include = field.startsWith("-") ? false : true
15
18
  field = field.replace("-", "")
16
19
  projection = {