Bugfix. Handle case where there's no room data

This commit is contained in:
JC Brand 2017-08-08 16:27:07 +02:00
parent a9d1e5c235
commit 805db75e10
2 changed files with 7 additions and 1 deletions

View File

@ -2629,7 +2629,10 @@
openChatRoom (ev) {
ev.preventDefault();
_converse.openChatRoom(this.parseRoomDataFromEvent(ev));
const data = this.parseRoomDataFromEvent(ev);
if (!_.isUndefined(data)) {
_converse.openChatRoom(data);
}
},
setDomain (ev) {

View File

@ -60,6 +60,9 @@
* user. They should always be shown.
*/
const result = this.__super__.parseRoomDataFromEvent.apply(this, arguments);
if (_.isUndefined(result)) {
return
}
result.hidden = false;
return result;
}