@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/hooks/index.js +2 -1
- package/dist/hooks/index.js.map +1 -1
- package/dist/hooks/index.mjs +2 -1
- package/dist/hooks/index.mjs.map +1 -1
- package/dist/index.js +2 -1
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +2 -1
- package/dist/index.mjs.map +1 -1
- package/dist/provider/index.js +2 -1
- package/dist/provider/index.js.map +1 -1
- package/dist/provider/index.mjs +2 -1
- package/dist/provider/index.mjs.map +1 -1
- package/package.json +2 -2
package/dist/hooks/index.mjs
CHANGED
|
@@ -1279,7 +1279,8 @@ function getCartAttributes({
|
|
|
1279
1279
|
{
|
|
1280
1280
|
key: "_weight",
|
|
1281
1281
|
value: cart?.lineItems.reduce((acc, item) => {
|
|
1282
|
-
|
|
1282
|
+
const itemWeight = new Decimal2(item.variant.weight ?? 0).times(item.quantity);
|
|
1283
|
+
return new Decimal2(acc).plus(itemWeight).toNumber();
|
|
1283
1284
|
}, 0).toString()
|
|
1284
1285
|
},
|
|
1285
1286
|
{
|