summaryrefslogtreecommitdiff
path: root/src-migrate/modules/cart
diff options
context:
space:
mode:
authorit-fixcomart <it@fixcomart.co.id>2024-09-02 10:54:00 +0700
committerit-fixcomart <it@fixcomart.co.id>2024-09-02 10:54:00 +0700
commit702b5d9b6e215ad812fadaff3325e1e6164d3b24 (patch)
treedfcd471df00e29ac06a839998c50df1c221fb052 /src-migrate/modules/cart
parenta2221f7b66f259cddc83ae95c159b30d7e5612ce (diff)
<iman> update pop up tambah keranjang
Diffstat (limited to 'src-migrate/modules/cart')
-rw-r--r--src-migrate/modules/cart/stores/useCartStore.ts2
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;