From d81d62f98d4f673396d1d96ca4cae1fb1e431b06 Mon Sep 17 00:00:00 2001 From: JC Brand Date: Sun, 7 May 2017 20:15:56 +0200 Subject: [PATCH] muc: check for `browserStorage` attr instead of whether connected --- src/converse-muc.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/converse-muc.js b/src/converse-muc.js index 6ee8a7ffc..fc47a36d4 100755 --- a/src/converse-muc.js +++ b/src/converse-muc.js @@ -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);