c2-mongoose 2.1.233 → 2.1.235
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,8 @@ var SearcherFlow = /** @class */ (function () {
|
|
|
63
63
|
this.page = 1;
|
|
64
64
|
this.limit = 50;
|
|
65
65
|
this.pageable = true;
|
|
66
|
-
this.select = [
|
|
67
|
-
this.populate = [
|
|
66
|
+
this.select = [];
|
|
67
|
+
this.populate = [];
|
|
68
68
|
this.filters = undefined;
|
|
69
69
|
this.model = repository;
|
|
70
70
|
}
|
|
@@ -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
package/src/flow/SearcherFlow.ts
CHANGED
|
@@ -23,8 +23,8 @@ class SearcherFlow<D> {
|
|
|
23
23
|
private limit: number = 50
|
|
24
24
|
private pageable: boolean = true
|
|
25
25
|
|
|
26
|
-
private select: string[] = [
|
|
27
|
-
private populate: string[] = [
|
|
26
|
+
private select: string[] = []
|
|
27
|
+
private populate: string[] = []
|
|
28
28
|
private filters: any = undefined
|
|
29
29
|
|
|
30
30
|
constructor(repository: mongoose.Model<any>) {
|