From e9e0267aa8a49ed126eaa1ea54c3e15569f70efb Mon Sep 17 00:00:00 2001 From: Riqwan Thamir Date: Tue, 10 Sep 2024 15:24:13 +0200 Subject: [PATCH] fix: broken order page due to missing inventory (#9083) --- .../order-summary-section/order-summary-section.tsx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/admin/dashboard/src/routes/orders/order-detail/components/order-summary-section/order-summary-section.tsx b/packages/admin/dashboard/src/routes/orders/order-detail/components/order-summary-section/order-summary-section.tsx index 0d5aebf2ad..4eb560ff0f 100644 --- a/packages/admin/dashboard/src/routes/orders/order-detail/components/order-summary-section/order-summary-section.tsx +++ b/packages/admin/dashboard/src/routes/orders/order-detail/components/order-summary-section/order-summary-section.tsx @@ -386,8 +386,8 @@ const Item = ({ }) => { const { t } = useTranslation() const isInventoryManaged = item.variant?.manage_inventory - - const hasInventoryKit = (item.variant.inventory_items?.length || 0) > 1 + const hasInventoryKit = + isInventoryManaged && (item.variant?.inventory_items?.length || 0) > 1 return ( <>