Commit 1cf8cfc9 authored by JC Brand's avatar JC Brand

Merge pull request #387 from gbonvehi/fix-unload-clearSession

Fixed an error that appears when unload event is triggered
parents c0bec459 ef305fff
......@@ -569,10 +569,13 @@
};
this.clearSession = function () {
if (this.roster) {
this.roster.browserStorage._clear();
}
this.session.browserStorage._clear();
var controlbox = converse.chatboxes.get('controlbox');
controlbox.save({'connected': false});
if (converse.connection.connected) {
converse.chatboxes.get('controlbox').save({'connected': false});
}
};
this.setSession = function () {
......
......@@ -6,6 +6,7 @@ Changelog
* 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. clearSessions during unload event would throw an error when not logged in. [gbonvehi]
0.9.3 (2015-05-01)
------------------
......
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