Skip to content

Commit 934ce85

Browse files
committed
fix #155
1 parent 4c2c274 commit 934ce85

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/actions/CartActions.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ import { createCustomerCart } from './RestActions';
77
export const addCouponToCart = (couponCode) => async (dispatch, getState) => {
88
dispatch({ type: types.MAGENTO_COUPON_LOADING, payload: true });
99
try {
10-
const cartId = getState().cart?.cartId;
10+
const cartId = getState().cart?.cartId || getState().cart?.quote?.id;
1111
let totals;
1212
if (magento.isCustomerLogin()) {
1313
await magento.admin.addCouponToCart(cartId, couponCode);

0 commit comments

Comments
 (0)