c2-mongoose 2.1.222 → 2.1.223
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.
|
@@ -26,8 +26,9 @@ var BuildPopulateSingleFlowItem = /** @class */ (function () {
|
|
|
26
26
|
var nested = rest.join('.');
|
|
27
27
|
var populateLocal = this_1.buildPath(first, nested);
|
|
28
28
|
if (Array.isArray(selectsStr)) {
|
|
29
|
-
var
|
|
30
|
-
var
|
|
29
|
+
var allSelectOfPopulate = selectsStr.filter(function (sel) { return sel.startsWith("".concat(first, ".")); });
|
|
30
|
+
var firstLevelSelect = allSelectOfPopulate.map(function (sel) { return sel.split(".")[1].trim(); });
|
|
31
|
+
var select = Array.from(new Set(firstLevelSelect)).join(" ").trim();
|
|
31
32
|
if ((0, Utils_1.isNotEmpty)(select)) {
|
|
32
33
|
populateLocal.select = select;
|
|
33
34
|
}
|
package/package.json
CHANGED
|
@@ -17,8 +17,9 @@ class BuildPopulateSingleFlowItem {
|
|
|
17
17
|
let populateLocal = this.buildPath(first, nested)
|
|
18
18
|
|
|
19
19
|
if (Array.isArray(selectsStr)) {
|
|
20
|
-
let
|
|
21
|
-
let
|
|
20
|
+
let allSelectOfPopulate = (selectsStr as []).filter((sel: string) => sel.startsWith(`${first}.`))
|
|
21
|
+
let firstLevelSelect = allSelectOfPopulate.map((sel: string) => sel.split(".")[1].trim())
|
|
22
|
+
let select = Array.from(new Set(firstLevelSelect)).join(" ").trim()
|
|
22
23
|
if (isNotEmpty(select)) {
|
|
23
24
|
populateLocal.select = select
|
|
24
25
|
}
|