Handle case were connection is not defined.
This commit is contained in:
parent
aee232421c
commit
0564f0f592
@ -71,7 +71,7 @@
|
||||
|
||||
clearSession: function () {
|
||||
this._super.clearSession.apply(this, arguments);
|
||||
if (this.connection.connected) {
|
||||
if (typeof this.connection !== 'undefined' && this.connection.connected) {
|
||||
this.chatboxes.get('controlbox').save({'connected': false});
|
||||
}
|
||||
},
|
||||
|
@ -554,8 +554,10 @@
|
||||
converse.auto_login = false;
|
||||
converse.chatboxviews.closeAllChatBoxes();
|
||||
converse.clearSession();
|
||||
if (typeof converse.connection !== 'undefined') {
|
||||
converse.connection.disconnect();
|
||||
converse.connection.reset();
|
||||
}
|
||||
};
|
||||
|
||||
this.registerGlobalEventHandlers = function () {
|
||||
|
Loading…
Reference in New Issue
Block a user