c2-mongoose 2.1.285 → 2.1.286
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.
|
@@ -383,9 +383,8 @@ var SearcherFlow = /** @class */ (function () {
|
|
|
383
383
|
}
|
|
384
384
|
var filtersFinal = {};
|
|
385
385
|
if (andQueriesParam.length > 0) {
|
|
386
|
-
if (!filtersFinal.$or)
|
|
387
|
-
|
|
388
|
-
filtersFinal.$or = __spreadArray(__spreadArray([], filtersFinal.$or, true), [{ $and: __spreadArray([], andQueriesParam, true) }], false);
|
|
386
|
+
// if (!filtersFinal.$or) filtersFinal.$or = []
|
|
387
|
+
filtersFinal = __assign(__assign({}, filtersFinal), andQueriesParam);
|
|
389
388
|
}
|
|
390
389
|
if (orPayload.length > 0) {
|
|
391
390
|
if (!filtersFinal.$or)
|
package/package.json
CHANGED
package/src/flow/SearcherFlow.ts
CHANGED
|
@@ -361,11 +361,10 @@ class SearcherFlow<D> {
|
|
|
361
361
|
}
|
|
362
362
|
}
|
|
363
363
|
|
|
364
|
-
|
|
365
|
-
|
|
364
|
+
let filtersFinal = {} as any
|
|
366
365
|
if (andQueriesParam.length > 0) {
|
|
367
|
-
if (!filtersFinal.$or) filtersFinal.$or = []
|
|
368
|
-
filtersFinal
|
|
366
|
+
// if (!filtersFinal.$or) filtersFinal.$or = []
|
|
367
|
+
filtersFinal = { ...filtersFinal, ...andQueriesParam }
|
|
369
368
|
}
|
|
370
369
|
|
|
371
370
|
if (orPayload.length > 0) {
|