@livequery/mongoose 2.0.11 → 2.0.21
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/build/src/MongoQuery.js +5 -2
- package/package.json +1 -1
package/build/src/MongoQuery.js
CHANGED
|
@@ -198,7 +198,10 @@ export class MongoQuery {
|
|
|
198
198
|
return p;
|
|
199
199
|
return {
|
|
200
200
|
...p,
|
|
201
|
-
[key]:
|
|
201
|
+
[key]: {
|
|
202
|
+
...p[key] || {},
|
|
203
|
+
...fn()
|
|
204
|
+
}
|
|
202
205
|
};
|
|
203
206
|
}, $or.length > 0 ? { $or } : {});
|
|
204
207
|
return [
|
|
@@ -323,7 +326,7 @@ export class MongoQuery {
|
|
|
323
326
|
summary: mappers.length == 0 ? 1 : mappers.reduce((p, c) => {
|
|
324
327
|
return {
|
|
325
328
|
...p,
|
|
326
|
-
[c.name]: `$summary.${c.group_id}.${c.id}
|
|
329
|
+
[c.name]: { $arrayElemAt: [`$summary.${c.group_id}.${c.id}`, 0] }
|
|
327
330
|
};
|
|
328
331
|
}, {}),
|
|
329
332
|
items: {
|
package/package.json
CHANGED