@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/hooks/index.d.mts +2 -2
- package/dist/hooks/index.d.ts +2 -2
- package/dist/hooks/index.js +5 -2
- package/dist/hooks/index.js.map +1 -1
- package/dist/hooks/index.mjs +5 -2
- package/dist/hooks/index.mjs.map +1 -1
- package/dist/index.js +5 -2
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +5 -2
- package/dist/index.mjs.map +1 -1
- package/dist/provider/index.js +5 -2
- package/dist/provider/index.js.map +1 -1
- package/dist/provider/index.mjs +5 -2
- package/dist/provider/index.mjs.map +1 -1
- package/package.json +3 -3
package/dist/index.js
CHANGED
|
@@ -1735,11 +1735,14 @@ function getCartBasicAttributes({
|
|
|
1735
1735
|
...weightAttributes,
|
|
1736
1736
|
...trackingAttributes,
|
|
1737
1737
|
...getReferralAttributes()
|
|
1738
|
-
].filter((item) => item?.value);
|
|
1738
|
+
].filter((item) => item?.value !== void 0 && item?.value !== null);
|
|
1739
1739
|
const extraAttributesInCart = cart?.customAttributes?.filter(
|
|
1740
1740
|
(item) => !commonAttributes.some((attr) => attr.key === item.key)
|
|
1741
1741
|
) || [];
|
|
1742
|
-
return [...commonAttributes, ...extraAttributesInCart].filter((item) => item?.value !== void 0 && item?.value !== null)
|
|
1742
|
+
return [...commonAttributes, ...extraAttributesInCart].filter((item) => item?.value !== void 0 && item?.value !== null).map((item) => ({
|
|
1743
|
+
key: item.key,
|
|
1744
|
+
value: typeof item.value === "string" ? item.value : String(item.value)
|
|
1745
|
+
}));
|
|
1743
1746
|
}
|
|
1744
1747
|
var useCartAttributes = ({
|
|
1745
1748
|
profile,
|