@lancom/shared 0.0.446 → 0.0.447

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.
@@ -154,8 +154,8 @@ export default {
154
154
  this.suburb = suburb;
155
155
  this.calculateShipping();
156
156
  },
157
- buildSignature() {
158
- return JSON.stringify((this.usedSimpleProducts || []).map(({ _id, amount }) => ({ _id, amount })));
157
+ buildSignature(usedSimpleProducts) {
158
+ return JSON.stringify((usedSimpleProducts || this.usedSimpleProducts || []).map(({ _id, amount }) => ({ _id, amount })));
159
159
  },
160
160
  async calculateShipping() {
161
161
  if (!this.hasSelection) {
@@ -186,7 +186,7 @@ export default {
186
186
  currency: this.currency?._id
187
187
  };
188
188
  this.pricing = await api.calculateProductPrice(payload, this.shop._id);
189
- this.lastUsedSimpleProductsSignature = this.buildSignature();
189
+ this.lastUsedSimpleProductsSignature = this.buildSignature(usedSimpleProducts);
190
190
  } catch (e) {
191
191
  this.pricing = null;
192
192
  } finally {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lancom/shared",
3
- "version": "0.0.446",
3
+ "version": "0.0.447",
4
4
  "description": "lancom common scripts",
5
5
  "author": "e.tokovenko <e.tokovenko@gmail.com>",
6
6
  "repository": {