瀏覽代碼

Bugfix. Check if chatbox exists

JC Brand 7 年之前
父節點
當前提交
ea60f190aa
共有 1 個文件被更改,包括 3 次插入1 次删除
  1. 3 1
      src/converse-chatboxes.js

+ 3 - 1
src/converse-chatboxes.js

@@ -791,7 +791,9 @@
                      * chatbox open for it, and if so attach it to the chatbox.
                      */
                     const chatbox = _converse.chatboxes.findWhere({'jid': contact.get('jid')});
-                    chatbox.addRelatedContact(contact);
+                    if (chatbox) {
+                        chatbox.addRelatedContact(contact);
+                    }
                 });
             });