Commit ea60f190 authored by JC Brand's avatar JC Brand

Bugfix. Check if chatbox exists

parent 04e948ad
......@@ -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);
}
});
});
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment