Commit 9f28728e authored by JC Brand's avatar JC Brand

Updates #849. Don't call when no connection present

parent ee8f37b4
...@@ -1146,7 +1146,11 @@ ...@@ -1146,7 +1146,11 @@
}, },
cleanup: function () { cleanup: function () {
this.model.save('connection_status', ROOMSTATUS.DISCONNECTED); if (_converse.connection.connected) {
this.model.save('connection_status', ROOMSTATUS.DISCONNECTED);
} else {
this.model.set('connection_status', ROOMSTATUS.DISCONNECTED);
}
this.removeHandlers(); this.removeHandlers();
_converse.ChatBoxView.prototype.close.apply(this, arguments); _converse.ChatBoxView.prototype.close.apply(this, arguments);
}, },
......
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