mirror of
https://github.com/MarekWo/mc-webui.git
synced 2026-04-30 18:42:29 +02:00
Fix critical JavaScript error that prevented channel selector from working: - Add null check for selectedOption before accessing .text property - Prevents "can't access property 'text', undefined" error at line 106 - This error occurred when selector options were being rebuilt Additional cleanup: - Remove duplicate escapeHtml() function definition - Add detailed console logging to loadChannels() for debugging Root cause: When populateChannelSelector() clears and rebuilds options, the change event can fire with an invalid selectedIndex, causing e.target.options[e.target.selectedIndex] to return undefined. Bug reported by user: TypeError at app.js:106 when switching channels 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>