Fix duplicate const BASE_PATH declaration in chat.js

main.js and chat.js both declared const BASE_PATH at top level.
When both load on index.html, the second const throws SyntaxError,
preventing chat.js from executing (chat FAB button unresponsive).

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
ln0422 2026-04-08 09:57:36 +08:00
parent 2c1688b4bb
commit 7344f3c9ce

View File

@ -1,5 +1,6 @@
// ── Chat Widget JavaScript ── // ── Chat Widget JavaScript ──
const BASE_PATH = window.BASE_PATH || ''; // BASE_PATH is declared in main.js (loaded first on index.html)
if (typeof BASE_PATH === 'undefined') var BASE_PATH = window.BASE_PATH || '';
let chatSessionId = sessionStorage.getItem('chat_session'); let chatSessionId = sessionStorage.getItem('chat_session');
if (!chatSessionId) { if (!chatSessionId) {