From 5d19d254da0925cb77416096973416b314d27a63 Mon Sep 17 00:00:00 2001 From: AlexSserb Date: Mon, 3 Mar 2025 11:00:32 +0400 Subject: [PATCH] fix: shipping product select fixed --- .../tabs/ShippingTab/components/ShippingProductSelect.tsx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/pages/CardsPage/tabs/ShippingTab/components/ShippingProductSelect.tsx b/src/pages/CardsPage/tabs/ShippingTab/components/ShippingProductSelect.tsx index cdf8842..f9a0dde 100644 --- a/src/pages/CardsPage/tabs/ShippingTab/components/ShippingProductSelect.tsx +++ b/src/pages/CardsPage/tabs/ShippingTab/components/ShippingProductSelect.tsx @@ -14,9 +14,9 @@ const ShippingProductSelect: FC = (props: Props) => { const data: ProductSchema[] = props.data.filter(product => { return ( - product.name.toLowerCase().includes(searchValue) || + product.name?.toLowerCase().includes(searchValue) || product.article?.toLowerCase().includes(searchValue) || - product.barcodes && product.barcodes[0].toLowerCase().includes(searchValue) + product.barcodes && product.barcodes.length > 0 && product.barcodes[0].toLowerCase().includes(searchValue) ); }); return data;