diff --git a/js/glowingbear.js b/js/glowingbear.js index 5078ef6..e386dea 100644 --- a/js/glowingbear.js +++ b/js/glowingbear.js @@ -1535,7 +1535,7 @@ weechat.directive('inputBar', function() { // Check if a modal is visible. If so, close it instead of disconnecting var modals = document.querySelectorAll('.gb-modal'); - for (var modalId in modals) { + for (var modalId = 0; modalId < modals.length; modalId++) { if (modals[modalId].getAttribute('data-state') === 'visible') { modals[modalId].setAttribute('data-state', 'hidden'); return true;