Commit d81d62f9 authored by JC Brand's avatar JC Brand

muc: check for `browserStorage` attr instead of whether connected

parent 70e4f285
......@@ -470,7 +470,7 @@
*
* This is instead done in `afterConnected` below.
*/
if (_converse.connection.connected) {
if (this.model.collection.browserStorage) {
// Without a connection, we haven't yet initialized
// localstorage
this.model.save();
......@@ -1150,7 +1150,7 @@
},
cleanup: function () {
if (_converse.connection.connected) {
if (this.model.collection.browserStorage) {
this.model.save('connection_status', ROOMSTATUS.DISCONNECTED);
} else {
this.model.set('connection_status', ROOMSTATUS.DISCONNECTED);
......
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