@anker-in/shopify-react 0.1.1-beta.29 → 0.1.1-beta.30

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.js CHANGED
@@ -879,10 +879,10 @@ var trackBuyNowGA = ({
879
879
  return;
880
880
  }
881
881
  const { variant } = lineItems[0];
882
- const currencyCode = variant.price?.currencyCode;
882
+ const currencyCode = variant.product?.price?.currencyCode || variant.price?.currencyCode;
883
883
  const totalPrice = lineItems?.reduce(
884
884
  (prev, { variant: variant2 }) => prev.plus(
885
- variant2?.finalPrice?.amount ?? variant2?.compareAtPrice?.amount ?? (variant2?.price?.amount || 0)
885
+ variant2?.finalPrice?.amount ?? variant2?.compareAtPrice?.amount ?? variant2?.price?.amount ?? 0
886
886
  ),
887
887
  new Decimal2__default.default(0)
888
888
  ).toNumber();