@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.mjs CHANGED
@@ -871,10 +871,10 @@ var trackBuyNowGA = ({
871
871
  return;
872
872
  }
873
873
  const { variant } = lineItems[0];
874
- const currencyCode = variant.price?.currencyCode;
874
+ const currencyCode = variant.product?.price?.currencyCode || variant.price?.currencyCode;
875
875
  const totalPrice = lineItems?.reduce(
876
876
  (prev, { variant: variant2 }) => prev.plus(
877
- variant2?.finalPrice?.amount ?? variant2?.compareAtPrice?.amount ?? (variant2?.price?.amount || 0)
877
+ variant2?.finalPrice?.amount ?? variant2?.compareAtPrice?.amount ?? variant2?.price?.amount ?? 0
878
878
  ),
879
879
  new Decimal2(0)
880
880
  ).toNumber();