From ed4601b8e8a8333bb64e286f562f9d0f8df45473 Mon Sep 17 00:00:00 2001 From: Samandar Turgunboyev Date: Thu, 12 Feb 2026 16:56:48 +0500 Subject: [PATCH] bug fix --- src/features/profile/ui/History.tsx | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/src/features/profile/ui/History.tsx b/src/features/profile/ui/History.tsx index 1a72b7e..b4acb8e 100644 --- a/src/features/profile/ui/History.tsx +++ b/src/features/profile/ui/History.tsx @@ -83,7 +83,7 @@ const HistoryTabs = () => { {/* Orders List */}
- {data.map((order: OrderList) => { + {data?.map((order: OrderList) => { const totalPrice = order.items.reduce( (sum, item) => sum + Number(item.price) * item.quantity, 0, @@ -144,7 +144,7 @@ const HistoryTabs = () => { {/* Products */}
- {order.items.map((item, index) => { + {order?.items?.map((item, index) => { const product = item.product; // Get product image @@ -212,8 +212,7 @@ const HistoryTabs = () => { {t('Miqdor')} - {item.quantity}{' '} - {product.meansurement || t('dona')} + {item?.quantity}