c2-mongoose 2.1.68 → 2.1.70

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.
@@ -141,7 +141,7 @@ var SearchFlow = /** @class */ (function () {
141
141
  var populate = this_1.buildPath(first, nested);
142
142
  if (Array.isArray(this_1.select)) {
143
143
  var selects = this_1.select.filter(function (sel) { return sel.startsWith("".concat(first, ".")); });
144
- populate.select = selects.join(" ");
144
+ populate.select = selects.map(function (sel) { return sel.split(".")[1]; }).join(" ");
145
145
  }
146
146
  populates.push(populate);
147
147
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "c2-mongoose",
3
- "version": "2.1.68",
3
+ "version": "2.1.70",
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",
@@ -72,7 +72,7 @@ abstract class SearchFlow {
72
72
  let populate = this.buildPath(first, nested)
73
73
  if (Array.isArray(this.select)) {
74
74
  let selects = (this.select as []).filter((sel: string) => sel.startsWith(`${first}.`))
75
- populate.select = selects.join(" ")
75
+ populate.select = selects.map((sel: string) => sel.split(".")[1]).join(" ")
76
76
  }
77
77
  populates.push(populate)
78
78
  }