@anker-in/shopify-react 0.1.1 → 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/hooks/index.mjs
CHANGED
|
@@ -713,14 +713,15 @@ function useAddCartLines(options) {
|
|
|
713
713
|
const { mutateCart, metafieldIdentifiers } = useCartContext();
|
|
714
714
|
const addLines = useCallback(
|
|
715
715
|
async (_key, { arg }) => {
|
|
716
|
-
const { cartId, lines } = arg;
|
|
716
|
+
const { cartId, lines, updateCookie = true } = arg;
|
|
717
717
|
const id = cartId || cartCookieAdapter?.getCartId(locale);
|
|
718
718
|
let updatedCart;
|
|
719
719
|
if (!id) {
|
|
720
720
|
updatedCart = await createCart(client, {
|
|
721
721
|
lines,
|
|
722
722
|
metafieldIdentifiers,
|
|
723
|
-
cookieAdapter: cartCookieAdapter
|
|
723
|
+
cookieAdapter: cartCookieAdapter,
|
|
724
|
+
updateCookie
|
|
724
725
|
});
|
|
725
726
|
} else {
|
|
726
727
|
updatedCart = await addCartLines(client, {
|