@resolveio/server-lib 4.5.6 → 4.5.7

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.
@@ -356,7 +356,7 @@ function loadReportBuilderMethods(methodManager) {
356
356
  initialGroup = { _id: {} };
357
357
  groupsRow.forEach(function (row) {
358
358
  initialGroup._id[row.id] = '$' + row.field.replace(/\.\$/g, '');
359
- initialGroup.rb_arrays_0 = { '$push': '$rb_arrays_0' };
359
+ initialGroup.rb_arrays_0 = { '$first': '$rb_arrays_0' };
360
360
  initialGroup.count = { '$sum': '$count' };
361
361
  selectedFields.filter(function (a) { return !a.fieldPath.includes('$') && a.collection_name === rootCollectionName; }).forEach(function (field) {
362
362
  if (field.leafValueType === 'Average') {
@@ -879,14 +879,12 @@ function loadReportBuilderMethods(methodManager) {
879
879
  if (initialNonSumValueProj) {
880
880
  query.push(initialNonSumValueProj);
881
881
  }
882
- if (initialGroup) {
883
- query.push({
884
- $unwind: {
885
- "path": "$rb_arrays_0",
886
- "preserveNullAndEmptyArrays": true
887
- }
888
- });
889
- }
882
+ query.push({
883
+ $unwind: {
884
+ "path": "$rb_arrays_0",
885
+ "preserveNullAndEmptyArrays": true
886
+ }
887
+ });
890
888
  for (i = 0; i < zipLayers.length; i++) {
891
889
  query.push(zipLayers[i]);
892
890
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@resolveio/server-lib",
3
- "version": "4.5.6",
3
+ "version": "4.5.7",
4
4
  "description": "",
5
5
  "main": "index.ts",
6
6
  "scripts": {