c2-mongoose 2.1.298 → 2.1.300
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.
|
@@ -278,7 +278,7 @@ var SearcherFlow = /** @class */ (function () {
|
|
|
278
278
|
condition[key] = { $in: value };
|
|
279
279
|
}
|
|
280
280
|
else {
|
|
281
|
-
condition[key] =
|
|
281
|
+
condition[key] = { $size: 0 };
|
|
282
282
|
}
|
|
283
283
|
}
|
|
284
284
|
}
|
|
@@ -312,7 +312,7 @@ var SearcherFlow = /** @class */ (function () {
|
|
|
312
312
|
var andQueriesParam = {};
|
|
313
313
|
Object.entries(objectSearch).forEach(function (_a) {
|
|
314
314
|
var key = _a[0], value = _a[1];
|
|
315
|
-
if (
|
|
315
|
+
if (value !== undefined || value === null) {
|
|
316
316
|
if ([
|
|
317
317
|
'or',
|
|
318
318
|
'filters',
|
package/package.json
CHANGED
package/src/flow/SearcherFlow.ts
CHANGED
|
@@ -255,7 +255,7 @@ class SearcherFlow<D> {
|
|
|
255
255
|
if (value.length > 0) {
|
|
256
256
|
condition[key] = { $in: value };
|
|
257
257
|
} else {
|
|
258
|
-
condition[key] =
|
|
258
|
+
condition[key] = { $size: 0 };
|
|
259
259
|
}
|
|
260
260
|
}
|
|
261
261
|
} else if (Array.isArray(value)) {
|
|
@@ -290,7 +290,7 @@ class SearcherFlow<D> {
|
|
|
290
290
|
|
|
291
291
|
let andQueriesParam = {} as any
|
|
292
292
|
Object.entries(objectSearch).forEach(([key, value]) => {
|
|
293
|
-
if (
|
|
293
|
+
if (value !== undefined || value === null) {
|
|
294
294
|
if ([
|
|
295
295
|
'or',
|
|
296
296
|
'filters',
|