@anker-in/shopify-react 1.2.1-beta.0 → 1.2.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
@@ -1727,11 +1727,14 @@ function getCartBasicAttributes({
1727
1727
  ...weightAttributes,
1728
1728
  ...trackingAttributes,
1729
1729
  ...getReferralAttributes()
1730
- ].filter((item) => item?.value);
1730
+ ].filter((item) => item?.value !== void 0 && item?.value !== null);
1731
1731
  const extraAttributesInCart = cart?.customAttributes?.filter(
1732
1732
  (item) => !commonAttributes.some((attr) => attr.key === item.key)
1733
1733
  ) || [];
1734
- return [...commonAttributes, ...extraAttributesInCart].filter((item) => item?.value !== void 0 && item?.value !== null);
1734
+ return [...commonAttributes, ...extraAttributesInCart].filter((item) => item?.value !== void 0 && item?.value !== null).map((item) => ({
1735
+ key: item.key,
1736
+ value: typeof item.value === "string" ? item.value : String(item.value)
1737
+ }));
1735
1738
  }
1736
1739
  var useCartAttributes = ({
1737
1740
  profile,