diff --git a/static/js/widget.js b/static/js/widget.js index f880f9b..c126afb 100644 --- a/static/js/widget.js +++ b/static/js/widget.js @@ -1,5 +1,3 @@ -console.log('ComboBoxWidget loaded'); - const ComboBoxWidget = (() => { let tempIdCounter = -1; diff --git a/templates/settings.html b/templates/settings.html index 4811092..ad2229b 100644 --- a/templates/settings.html +++ b/templates/settings.html @@ -139,8 +139,10 @@ if (name.trim()) { const newRoom = ComboBoxWidget.createOption(`${name}`, null); - document.getElementById('room-list').appendChild(newRoom); - ComboBoxWidget.sortOptions(document.getElementById('room-list')); + const selectWidget = document.getElementById('room-list'); + + selectWidget.appendChild(newRoom); + ComboBoxWidget.sortOptions(selectWidget); bootstrap.Modal.getInstance(modal).hide(); } else { alert('Please enter a room name.');