ublo-lib 1.19.6 → 1.19.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.
@@ -129,24 +129,27 @@ function setPurchaseAttempts(cartId, attempts) {
129
129
  }));
130
130
  }
131
131
  function formatPeekPerformancesItem(items, propertiesToRetrieve) {
132
- return items.map(item => {
132
+ if (!items || !items.length) return;
133
+ return items.map(({
134
+ gtmData
135
+ }) => {
133
136
  let properties = {};
134
137
  if (propertiesToRetrieve.includes("kind")) {
135
138
  properties = {
136
139
  ...properties,
137
- kind: item.item_category
140
+ kind: gtmData.item_category
138
141
  };
139
142
  }
140
143
  if (propertiesToRetrieve.includes("quantity")) {
141
144
  properties = {
142
145
  ...properties,
143
- quantity: item.quantity
146
+ quantity: gtmData.quantity
144
147
  };
145
148
  }
146
149
  if (propertiesToRetrieve.includes("price")) {
147
150
  properties = {
148
151
  ...properties,
149
- price: item.price
152
+ price: gtmData.price
150
153
  };
151
154
  }
152
155
  return properties;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "ublo-lib",
3
- "version": "1.19.6",
3
+ "version": "1.19.7",
4
4
  "peerDependencies": {
5
5
  "dt-design-system": "^3.1.5",
6
6
  "leaflet": "^1.9.1",