Browse Source

Ignore non-existent MUC list query input domain element for tests to pass

This is probably just a race condition.
BetaRays 7 tháng trước cách đây
mục cha
commit
681831390e
1 tập tin đã thay đổi với 4 bổ sung1 xóa
  1. 4 1
      src/plugins/muc-views/modals/muc-list.js

+ 4 - 1
src/plugins/muc-views/modals/muc-list.js

@@ -111,7 +111,10 @@ export default class MUCListModal extends BaseModal {
     }
 
     onDomainChange () {
-        this.querySelector('form-control').value = this.model.get('muc_domain');
+        const domain_input = this.querySelector('form-control');
+        if (domain_input) {
+            /** @type {HTMLInputElement} */(domain_input).value = this.model.get('muc_domain');
+        }
         this.items = [];
         this.model.save('feedback_text', '');
         api.settings.get('auto_list_rooms') && this.updateRoomsList();