From fc81e9bb151a583ff42146e14453a21c9e1b2c4f Mon Sep 17 00:00:00 2001 From: "kelvin.yau" Date: Fri, 3 Oct 2025 15:37:23 +0800 Subject: [PATCH] fix --- src/components/JoSearch/JoSearch.tsx | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/components/JoSearch/JoSearch.tsx b/src/components/JoSearch/JoSearch.tsx index ca95d2b..55fe5f4 100644 --- a/src/components/JoSearch/JoSearch.tsx +++ b/src/components/JoSearch/JoSearch.tsx @@ -58,14 +58,14 @@ const JoSearch: React.FC = ({ defaultInputs, bomCombo }) => { name: "item", label: t("Item Code"), renderCell: (row) => { - return t(row.item.code) + return row.item ? t(row.item.code) : '-' } }, { name: "itemName", label: t("Item Name"), renderCell: (row) => { - return t(row.item.name) + return row.item ? t(row.item.name) : '-' } }, { @@ -83,7 +83,7 @@ const JoSearch: React.FC = ({ defaultInputs, bomCombo }) => { align: "left", headerAlign: "left", renderCell: (row) => { - return t(row.item.uom.udfudesc) + return row.item?.uom ? t(row.item.uom.udfudesc) : '-' } }, {