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) })