From 661523e963f51dd34e8ff377a637f0d2938cdb5e Mon Sep 17 00:00:00 2001 From: Hyungi Ahn Date: Wed, 1 Apr 2026 11:11:29 +0900 Subject: [PATCH] =?UTF-8?q?fix(core):=20escHtml=20const=20=EC=B6=A9?= =?UTF-8?q?=EB=8F=8C=20=ED=95=B4=EC=86=8C=20=E2=80=94=20=EB=AA=A8=EB=B0=94?= =?UTF-8?q?=EC=9D=BC=20=ED=8E=98=EC=9D=B4=EC=A7=80=20=EA=B8=B4=EA=B8=89=20?= =?UTF-8?q?=EB=B3=B5=EA=B5=AC?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit tkfb-core.js의 const escHtml이 4개 JS 파일의 function escHtml()과 전역 스코프에서 충돌하여 SyntaxError 발생, 해당 페이지 JS 전체 미실행. - tkfb-core.js에서 const escHtml 제거 - schedule.html에서 escHtml → escapeHtml 직접 호출로 변경 Co-Authored-By: Claude Opus 4.6 (1M context) --- system1-factory/web/pages/work/schedule.html | 6 +++--- system1-factory/web/static/js/tkfb-core.js | 1 - 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/system1-factory/web/pages/work/schedule.html b/system1-factory/web/pages/work/schedule.html index 1b5277f..110b216 100644 --- a/system1-factory/web/pages/work/schedule.html +++ b/system1-factory/web/pages/work/schedule.html @@ -361,21 +361,21 @@ const r = await apiFetch('/api/schedule/product-types'); typeSel.innerHTML = ''; (r.data || []).forEach(pt => { - typeSel.innerHTML += ``; + typeSel.innerHTML += ``; }); } catch(e) { console.warn('제품유형 로드 실패:', e); } // 프로젝트 목록 (기존 gantt에서 사용 중인 projects 변수 활용) if (typeof allProjects !== 'undefined' && allProjects.length) { projSel.innerHTML = allProjects.map(p => - `` + `` ).join(''); } else { try { const r = await apiFetch('/api/projects/active'); const projs = r.data || []; projSel.innerHTML = projs.map(p => - `` + `` ).join(''); } catch(e) { projSel.innerHTML = ''; } } diff --git a/system1-factory/web/static/js/tkfb-core.js b/system1-factory/web/static/js/tkfb-core.js index a04f27f..643c95d 100644 --- a/system1-factory/web/static/js/tkfb-core.js +++ b/system1-factory/web/static/js/tkfb-core.js @@ -64,7 +64,6 @@ function showToast(msg, type = 'success') { /* ===== Escape ===== */ function escapeHtml(str) { if (!str) return ''; const d = document.createElement('div'); d.textContent = str; return d.innerHTML; } -const escHtml = escapeHtml; /* ===== Helpers ===== */ function formatDate(d) { if (!d) return ''; return String(d).substring(0, 10); }