Adds null check for the connection when checking whether we have joined a muc.

This commit is contained in:
damencho 2015-09-29 11:55:39 -05:00
parent ababa0fadc
commit f626c5fbc0
1 changed files with 1 additions and 1 deletions

View File

@ -576,7 +576,7 @@ var XMPP = {
},
// Returns true iff we have joined the MUC.
isMUCJoined: function () {
return connection.emuc.joined;
return connection === null ? false : connection.emuc.joined;
},
getSessions: function () {
return connection.jingle.sessions;