Commit 4f7c08b1 authored by JC Brand's avatar JC Brand

Bail when in a callback for a hanging chatroom

parent 3a375772
...@@ -531,6 +531,12 @@ ...@@ -531,6 +531,12 @@
if (this.model.get('connection_status') !== converse.ROOMSTATUS.ENTERED) { if (this.model.get('connection_status') !== converse.ROOMSTATUS.ENTERED) {
const handler = () => { const handler = () => {
if (!u.isPersistableModel(this.model)) {
// Happens during tests, nothing to do if this
// is a hanging chatbox (i.e. not in the
// collection anymore).
return;
}
this.join(); this.join();
this.fetchMessages(); this.fetchMessages();
_converse.emit('chatRoomOpened', this); _converse.emit('chatRoomOpened', this);
......
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