@anker-in/shopify-react 1.0.0 → 1.0.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.d.mts +1 -0
- package/dist/hooks/index.d.ts +1 -0
- package/dist/hooks/index.js +3 -2
- package/dist/hooks/index.js.map +1 -1
- package/dist/hooks/index.mjs +3 -2
- package/dist/hooks/index.mjs.map +1 -1
- package/dist/index.js +3 -2
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +3 -2
- package/dist/index.mjs.map +1 -1
- package/package.json +3 -3
package/dist/index.mjs
CHANGED
|
@@ -802,14 +802,15 @@ function useAddCartLines(options) {
|
|
|
802
802
|
const { mutateCart, metafieldIdentifiers } = useCartContext();
|
|
803
803
|
const addLines = useCallback(
|
|
804
804
|
async (_key, { arg }) => {
|
|
805
|
-
const { cartId, lines } = arg;
|
|
805
|
+
const { cartId, lines, updateCookie = true } = arg;
|
|
806
806
|
const id = cartId || cartCookieAdapter?.getCartId(locale);
|
|
807
807
|
let updatedCart;
|
|
808
808
|
if (!id) {
|
|
809
809
|
updatedCart = await createCart(client, {
|
|
810
810
|
lines,
|
|
811
811
|
metafieldIdentifiers,
|
|
812
|
-
cookieAdapter: cartCookieAdapter
|
|
812
|
+
cookieAdapter: cartCookieAdapter,
|
|
813
|
+
updateCookie
|
|
813
814
|
});
|
|
814
815
|
} else {
|
|
815
816
|
updatedCart = await addCartLines(client, {
|