c2-mongoose 2.1.241 → 2.1.242
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.
|
@@ -63,8 +63,11 @@ var BuildPopulateSingleFlowItem = /** @class */ (function () {
|
|
|
63
63
|
// var populate = {} as IPopulate
|
|
64
64
|
var _a;
|
|
65
65
|
if (nested === void 0) { nested = ""; }
|
|
66
|
-
if (
|
|
67
|
-
populateAcc.path
|
|
66
|
+
if (populateAcc.path === undefined) {
|
|
67
|
+
populateAcc.path = "";
|
|
68
|
+
}
|
|
69
|
+
else if (!((_a = populateAcc.path) === null || _a === void 0 ? void 0 : _a.includes(target))) {
|
|
70
|
+
populateAcc.path += " ".concat(target).trim();
|
|
68
71
|
}
|
|
69
72
|
if ((0, Utils_1.isNotEmpty)(nested)) {
|
|
70
73
|
var _b = nested.split('.'), first = _b[0], rest = _b.slice(1);
|
package/package.json
CHANGED
|
@@ -55,8 +55,10 @@ class BuildPopulateSingleFlowItem {
|
|
|
55
55
|
public buildPath(target: string, nested: string = "", populateAcc: IPopulate): IPopulate {
|
|
56
56
|
// var populate = {} as IPopulate
|
|
57
57
|
|
|
58
|
-
if (
|
|
59
|
-
populateAcc.path
|
|
58
|
+
if (populateAcc.path === undefined) {
|
|
59
|
+
populateAcc.path = ``
|
|
60
|
+
} else if (!populateAcc.path?.includes(target)){
|
|
61
|
+
populateAcc.path += ` ${target}`.trim()
|
|
60
62
|
}
|
|
61
63
|
|
|
62
64
|
if (isNotEmpty(nested)) {
|