From f3c6d20442fd8e6210dc33870a3dd868f063882a Mon Sep 17 00:00:00 2001 From: "hehihoho3@gmail.com" Date: Fri, 26 Jun 2026 14:44:53 +0900 Subject: [PATCH] =?UTF-8?q?fix(channels):=20=EC=A0=84=EC=B2=B4=20=EC=84=A0?= =?UTF-8?q?=ED=83=9D=20=EC=8B=9C=20=EC=B2=B4=ED=81=AC=20=EC=8B=9C=EA=B0=81?= =?UTF-8?q?=ED=99=94=20=EA=B9=A8=EC=A7=80=EB=8D=98=20=EB=AC=B8=EC=A0=9C(lu?= =?UTF-8?q?cide=EA=B0=80=20i=EB=A5=BC=20svg=EB=A1=9C=20=EC=B9=98=ED=99=98)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit querySelector('i')가 lucide 치환 후 null→TypeError로 시각 토글이 첫 카드에서 멈춰 전체 선택이 안 되는 것처럼 보였음. querySelector('svg, i') + null 가드로 수정. Co-Authored-By: Claude Opus 4.8 (1M context) --- src/main/resources/templates/channels.html | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/main/resources/templates/channels.html b/src/main/resources/templates/channels.html index b933bf1..6a687a7 100644 --- a/src/main/resources/templates/channels.html +++ b/src/main/resources/templates/channels.html @@ -213,20 +213,21 @@ checkboxes.forEach(cb => { const card = cb.closest('.card'); const customCb = card.querySelector('.custom-checkbox'); - const checkIcon = customCb.querySelector('i'); + // lucide 가 로 치환하므로 둘 다 잡는다(없으면 무시). + const checkIcon = customCb.querySelector('svg, i'); if (cb.checked) { card.style.borderColor = 'var(--primary)'; card.style.background = 'rgba(59, 130, 246, 0.05)'; customCb.style.background = 'var(--primary)'; customCb.style.borderColor = 'var(--primary)'; - checkIcon.style.display = 'block'; + if (checkIcon) checkIcon.style.display = 'block'; } else { card.style.borderColor = 'var(--glass-border)'; card.style.background = 'var(--glass-bg)'; customCb.style.background = 'var(--surface-2)'; customCb.style.borderColor = 'var(--border-strong)'; - checkIcon.style.display = 'none'; + if (checkIcon) checkIcon.style.display = 'none'; } }); if (window.lucide) window.lucide.createIcons();