@anker-in/shopify-react 1.1.0-beta.1 → 1.1.1-beta.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.
package/dist/index.mjs CHANGED
@@ -1403,7 +1403,8 @@ function getCartAttributes({
1403
1403
  {
1404
1404
  key: "_weight",
1405
1405
  value: cart?.lineItems.reduce((acc, item) => {
1406
- return new Decimal2(acc).plus(item.variant.weight ?? 0).toNumber();
1406
+ const itemWeight = new Decimal2(item.variant.weight ?? 0).times(item.quantity);
1407
+ return new Decimal2(acc).plus(itemWeight).toNumber();
1407
1408
  }, 0).toString()
1408
1409
  },
1409
1410
  {