fix: htmx 중복 로드 시 JavaScript 변수 재선언 에러 수정

- GuideModal, ExampleFlows, ExamplesModal 변수를 const에서 window 패턴으로 변경
- htmx가 콘텐츠를 다시 로드할 때 'Identifier has already been declared' 에러 방지
- window.XXX = window.XXX || {} 패턴으로 중복 선언 방지

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
2025-12-29 14:41:20 +09:00
parent 358c987cc1
commit dcae003e32
2 changed files with 5 additions and 3 deletions

View File

@@ -181,7 +181,8 @@ class="px-4 py-2 bg-gray-600 hover:bg-gray-700 text-white rounded-lg transition-
@verbatim
<script>
const ExampleFlows = {
// htmx 중복 로드 시 재선언 방지
window.ExampleFlows = window.ExampleFlows || {
'item-master-full': {
"version": "1.0",
"meta": {
@@ -838,7 +839,7 @@ class="px-4 py-2 bg-gray-600 hover:bg-gray-700 text-white rounded-lg transition-
}
};
const ExamplesModal = {
window.ExamplesModal = window.ExamplesModal || {
open() {
document.getElementById('examples-modal').classList.remove('hidden');
document.body.style.overflow = 'hidden';

View File

@@ -535,7 +535,8 @@ class="px-4 py-2 bg-gray-600 hover:bg-gray-700 text-white rounded-lg transition-
</style>
<script>
const GuideModal = {
// htmx 중복 로드 시 재선언 방지
window.GuideModal = window.GuideModal || {
open() {
document.getElementById('guide-modal').classList.remove('hidden');
document.body.style.overflow = 'hidden';