c2-mongoose 2.1.100 → 2.1.101
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.
package/dist/flow/SearchFlow.js
CHANGED
|
@@ -460,6 +460,12 @@ var SearchFlow = /** @class */ (function () {
|
|
|
460
460
|
condition[key] = value;
|
|
461
461
|
}
|
|
462
462
|
else {
|
|
463
|
+
for (var _i = 0, value_1 = value; _i < value_1.length; _i++) {
|
|
464
|
+
var val = value_1[_i];
|
|
465
|
+
if (typeof val === 'string' && _this.isValidObjectId(val)) {
|
|
466
|
+
val = new mongoose_1.Types.ObjectId(val);
|
|
467
|
+
}
|
|
468
|
+
}
|
|
463
469
|
condition[key] = { $in: value };
|
|
464
470
|
}
|
|
465
471
|
filters.$and.push(condition);
|
package/package.json
CHANGED
package/src/flow/SearchFlow.ts
CHANGED
|
@@ -385,6 +385,12 @@ abstract class SearchFlow {
|
|
|
385
385
|
if (!Array.isArray(value)) {
|
|
386
386
|
condition[key] = value
|
|
387
387
|
} else {
|
|
388
|
+
for(let val of value) {
|
|
389
|
+
if (typeof val === 'string' && this.isValidObjectId(val as string)) {
|
|
390
|
+
val = new Types.ObjectId(val as string)
|
|
391
|
+
}
|
|
392
|
+
}
|
|
393
|
+
|
|
388
394
|
condition[key] = { $in: value }
|
|
389
395
|
}
|
|
390
396
|
filters.$and.push(condition)
|