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