Merge pull request #387 from gbonvehi/fix-unload-clearSession
Fixed an error that appears when unload event is triggered
This commit is contained in:
commit
1cf8cfc9f6
|
@ -569,10 +569,13 @@
|
||||||
};
|
};
|
||||||
|
|
||||||
this.clearSession = function () {
|
this.clearSession = function () {
|
||||||
this.roster.browserStorage._clear();
|
if (this.roster) {
|
||||||
|
this.roster.browserStorage._clear();
|
||||||
|
}
|
||||||
this.session.browserStorage._clear();
|
this.session.browserStorage._clear();
|
||||||
var controlbox = converse.chatboxes.get('controlbox');
|
if (converse.connection.connected) {
|
||||||
controlbox.save({'connected': false});
|
converse.chatboxes.get('controlbox').save({'connected': false});
|
||||||
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
this.setSession = function () {
|
this.setSession = function () {
|
||||||
|
|
|
@ -6,6 +6,7 @@ Changelog
|
||||||
|
|
||||||
* Refactored in order to remove the strophe.roster.js dependency. [jcbrand]
|
* Refactored in order to remove the strophe.roster.js dependency. [jcbrand]
|
||||||
* Bugfix. Manual login doesn't work when only websocket_url is set and not bosh_service_url. [jcbrand]
|
* Bugfix. Manual login doesn't work when only websocket_url is set and not bosh_service_url. [jcbrand]
|
||||||
|
* Bugfix. clearSessions during unload event would throw an error when not logged in. [gbonvehi]
|
||||||
|
|
||||||
0.9.3 (2015-05-01)
|
0.9.3 (2015-05-01)
|
||||||
------------------
|
------------------
|
||||||
|
|
Loading…
Reference in New Issue
Block a user