From c464f1ec3efd9060f14dd15dd0799583c5568d9f Mon Sep 17 00:00:00 2001 From: basssy Date: Mon, 9 Dec 2024 16:25:51 +0900 Subject: [PATCH] =?UTF-8?q?=EA=B2=AC=EC=A0=81=EC=84=9C=20=EC=A0=80?= =?UTF-8?q?=EC=9E=A5=20=ED=95=84=EC=88=98=EA=B0=92=20=20null=EC=B2=B4?= =?UTF-8?q?=ED=81=AC=20=EC=B6=94=EA=B0=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/estimate/Estimate.jsx | 2 +- src/hooks/floorPlan/estimate/useEstimateController.js | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/components/estimate/Estimate.jsx b/src/components/estimate/Estimate.jsx index 1d3b18ae..eb7d89d1 100644 --- a/src/components/estimate/Estimate.jsx +++ b/src/components/estimate/Estimate.jsx @@ -1128,7 +1128,7 @@ export default function Estimate({ params }) { { setEstimateContextState({ fileFlg: e.target.checked ? '1' : '0', diff --git a/src/hooks/floorPlan/estimate/useEstimateController.js b/src/hooks/floorPlan/estimate/useEstimateController.js index 6c9f221b..762cf421 100644 --- a/src/hooks/floorPlan/estimate/useEstimateController.js +++ b/src/hooks/floorPlan/estimate/useEstimateController.js @@ -148,12 +148,12 @@ export const useEstimateController = (planNo) => { let originFileFlg = false let fileFlg = true let itemFlg = true - if (estimateData.charger.trim().length === 0) { + if (estimateData?.charger === null || estimateData?.charger?.trim().length === 0) { flag = false return alert(getMessage('estimate.detail.save.requiredCharger')) } - if (estimateData.objectName.trim().length === 0) { + if (estimateData?.objectName === null || estimateData?.objectName?.trim().length === 0) { flag = false return alert(getMessage('estimate.detail.save.requiredObjectName')) }