@licklist/design 0.71.6-dev.0 → 0.71.6-dev.1

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.
@@ -70,6 +70,7 @@ var convertEventStatisticToTableData = function(date, eventStatistic) {
70
70
  });
71
71
  }
72
72
  productsSummary === null || productsSummary === void 0 ? void 0 : productsSummary.forEach(function(productSummary, productIndex) {
73
+ var _maxBy;
73
74
  quantity += productSummary.productsSold;
74
75
  var _summaryMap_get;
75
76
  var existingProduct = (_summaryMap_get = summaryMap.get("".concat(categoryName, ".").concat(productSummary.name))) !== null && _summaryMap_get !== void 0 ? _summaryMap_get : {
@@ -81,8 +82,8 @@ var convertEventStatisticToTableData = function(date, eventStatistic) {
81
82
  var overrides = allProductSummaryAtCategory.filter(function(summary) {
82
83
  return summary.originalProductId === productSummary.id;
83
84
  });
84
- var maxTotalQuantity = maxBy(overrides, 'id').totalQuantity;
85
- var totalQuantity = maxTotalQuantity || productSummary.totalQuantity;
85
+ var maxTotalQuantity = (_maxBy = maxBy(overrides, 'id')) === null || _maxBy === void 0 ? void 0 : _maxBy.totalQuantity;
86
+ var totalQuantity = maxTotalQuantity || (productSummary === null || productSummary === void 0 ? void 0 : productSummary.totalQuantity);
86
87
  summaryMap.set("".concat(categoryName, ".").concat(productSummary.name), {
87
88
  name: productSummary.name,
88
89
  key: "".concat(eventId, ".").concat(categoryName).concat(productIndex).concat(productSummary.name),
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@licklist/design",
3
- "version": "0.71.6-dev.0",
3
+ "version": "0.71.6-dev.1",
4
4
  "repository": {
5
5
  "type": "git",
6
6
  "url": "git+ssh://git@bitbucket.org/artelogicsoft/licklist_design.git"
@@ -98,9 +98,9 @@ export const convertEventStatisticToTableData = (
98
98
  (summary) => summary.originalProductId === productSummary.id,
99
99
  )
100
100
 
101
- const maxTotalQuantity = maxBy(overrides, 'id').totalQuantity
101
+ const maxTotalQuantity = maxBy(overrides, 'id')?.totalQuantity
102
102
 
103
- const totalQuantity = maxTotalQuantity || productSummary.totalQuantity
103
+ const totalQuantity = maxTotalQuantity || productSummary?.totalQuantity
104
104
 
105
105
  summaryMap.set(`${categoryName}.${productSummary.name}`, {
106
106
  name: productSummary.name,