From 52d76419c9ed05a8559cb89020b9bc11b46816c8 Mon Sep 17 00:00:00 2001 From: basssy Date: Thu, 28 Nov 2024 14:21:58 +0900 Subject: [PATCH] =?UTF-8?q?=EC=B2=A8=EB=B6=80=ED=8C=8C=EC=9D=BC=EC=88=98?= =?UTF-8?q?=20=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/hooks/floorPlan/estimate/useEstimateController.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/hooks/floorPlan/estimate/useEstimateController.js b/src/hooks/floorPlan/estimate/useEstimateController.js index f5631825..c797f5fc 100644 --- a/src/hooks/floorPlan/estimate/useEstimateController.js +++ b/src/hooks/floorPlan/estimate/useEstimateController.js @@ -3,7 +3,7 @@ import { useContext, useEffect, useReducer, useState } from 'react' import { useRecoilState, useRecoilValue } from 'recoil' import { globalLocaleStore } from '@/store/localeAtom' import { estimateState, floorPlanObjectState } from '@/store/floorPlanObjectAtom' -import { isObjectNotEmpty } from '@/util/common-utils' +import { isObjectNotEmpty, isNotEmptyArray } from '@/util/common-utils' import { SessionContext } from '@/app/SessionProvider' import { useMessage } from '@/hooks/useMessage' import { useRouter } from 'next/navigation' @@ -202,7 +202,7 @@ export const useEstimateController = (planNo) => { if (flag && fileFlg && itemFlg) { //1. 첨부파일 저장시작 const formData = new FormData() - if (estimateData.tempFileList.length > 1) { + if (isNotEmptyArray(estimateData.tempFileList) > 1) { estimateData.tempFileList.forEach((file) => { formData.append('files', file) })