From 4aa81e13b2999d0b4395ba74a12bd655351501a3 Mon Sep 17 00:00:00 2001 From: umsangdon Date: Thu, 1 Oct 2026 09:43:18 +0900 Subject: [PATCH] =?UTF-8?q?fix(m01-easycalc):=20Pick=20=EC=9E=AC=EB=A3=8C?= =?UTF-8?q?=20=EC=83=81=EC=84=B8=EA=B5=AC=EB=B6=84=20=EB=B9=88=20=EA=B0=92?= =?UTF-8?q?=20=EB=B3=B4=EB=83=84=20=EA=B3=A0=EC=B9=A8=20=C2=B7=20=EA=B2=80?= =?UTF-8?q?=EC=83=89=20=EA=B2=B0=EA=B3=BC=20=EC=83=81=EC=84=B8=EA=B5=AC?= =?UTF-8?q?=EB=B6=84=20=EC=95=88=20=EB=B6=99=EC=9E=84?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-Authored-By: Claude Sonnet 5.5 Claude-Session: https://claude.ai/code/session_019ACSGaHdLgnkEkoA4LDtMU --- M01_MasterData/EasyCalc/M01_EasyCalc_Pick.ts | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/M01_MasterData/EasyCalc/M01_EasyCalc_Pick.ts b/M01_MasterData/EasyCalc/M01_EasyCalc_Pick.ts index e08cb5e85..a7b9bc8cb 100644 --- a/M01_MasterData/EasyCalc/M01_EasyCalc_Pick.ts +++ b/M01_MasterData/EasyCalc/M01_EasyCalc_Pick.ts @@ -137,10 +137,12 @@ const SOURCES: Partial> = { .filter((it) => !f.sub || (it as { 구분?: string }).구분 === f.sub) .map((it) => ({ ...it, 구분: (it as { 구분?: string }).구분, 상세구분: undefined })), })) - : await fetchMaterials({ sub: f.sub, detail: f.detail || undefined }).then((r) => ({ - total: r.total, - items: r.items.map((it) => ({ ...it, 구분: it.구분 ?? f.sub })), - })); + : await fetchMaterials({ sub: f.sub, ...(f.detail ? { detail: f.detail } : {}) }).then( + (r) => ({ + total: r.total, + items: r.items.map((it) => ({ ...it, 구분: it.구분 ?? f.sub })), + }), + ); return { total: found.total, items: found.items.map((it) => { @@ -149,7 +151,7 @@ const SOURCES: Partial> = { const unit = typeof it.단위 === "string" ? it.단위 : ""; const price = num(it.값); const element: Record = { 구분: it.구분 ?? f.sub }; - const detail = (it as { 상세구분?: string }).상세구분 ?? f.detail; + const detail = (it as { 상세구분?: string }).상세구분; if (detail) element["상세구분"] = detail; element["검색어"] = `${name} ${spec}`.trim(); return {