Updates #994. may not be defined

This commit is contained in:
JC Brand 2018-01-22 12:36:58 +01:00
parent 972e682e75
commit c012351df2
2 changed files with 9 additions and 5 deletions

View File

@ -5,6 +5,7 @@
### Bugfixes
- Could not register on Ejabberd 18. `"Missing attribute 'id' in tag qualified by namespace 'jabber:client'"`
- #994 TypeError when using the `user.login` API.
- #995 `ChildNode.replaceWith` is not available in Internet Explorer or Safari. Use `Node.replaceChild` instead.
## 3.3.1 (2018-01-18)

View File

@ -115,11 +115,14 @@
clearSession () {
this.__super__.clearSession.apply(this, arguments);
const controlbox = this.chatboxes.get('controlbox');
if (controlbox &&
controlbox.collection &&
controlbox.collection.browserStorage) {
controlbox.save({'connected': false});
const chatboxes = _.get(this, 'chatboxes', null);
if (!_.isNil(chatboxes)) {
const controlbox = chatboxes.get('controlbox');
if (controlbox &&
controlbox.collection &&
controlbox.collection.browserStorage) {
controlbox.save({'connected': false});
}
}
},