diff options
| author | it-fixcomart <it@fixcomart.co.id> | 2024-09-02 10:54:00 +0700 |
|---|---|---|
| committer | it-fixcomart <it@fixcomart.co.id> | 2024-09-02 10:54:00 +0700 |
| commit | 702b5d9b6e215ad812fadaff3325e1e6164d3b24 (patch) | |
| tree | dfcd471df00e29ac06a839998c50df1c221fb052 /src-migrate/modules/cart | |
| parent | a2221f7b66f259cddc83ae95c159b30d7e5612ce (diff) | |
<iman> update pop up tambah keranjang
Diffstat (limited to 'src-migrate/modules/cart')
| -rw-r--r-- | src-migrate/modules/cart/stores/useCartStore.ts | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src-migrate/modules/cart/stores/useCartStore.ts b/src-migrate/modules/cart/stores/useCartStore.ts index aad39a30..c2ebf50f 100644 --- a/src-migrate/modules/cart/stores/useCartStore.ts +++ b/src-migrate/modules/cart/stores/useCartStore.ts @@ -54,7 +54,7 @@ export const useCartStore = create<State & Action>((set, get) => ({ const computeSummary = (cart: CartProps) => { let subtotal = 0; let discount = 0; - for (const item of cart.products) { + for (const item of cart?.products) { if (!item.selected) continue; let price = 0; |
