c2-mongoose 2.1.72 → 2.1.73

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.
@@ -112,7 +112,7 @@ var SearchFlow = /** @class */ (function () {
112
112
  var projection = {};
113
113
  for (var _i = 0, _a = this.select; _i < _a.length; _i++) {
114
114
  var field = _a[_i];
115
- if (field.indexOf(".")) {
115
+ if (!field.indexOf(".")) {
116
116
  projection[field] = 1;
117
117
  }
118
118
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "c2-mongoose",
3
- "version": "2.1.72",
3
+ "version": "2.1.73",
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",
@@ -38,7 +38,7 @@ abstract class SearchFlow {
38
38
 
39
39
  let projection: { [key: string]: number } = {}
40
40
  for (var field of this.select) {
41
- if (field.indexOf(".")) {
41
+ if (!field.indexOf(".")) {
42
42
  projection[field] = 1
43
43
  }
44
44
  }