Handle case where there aren't bookmarks

This commit is contained in:
JC Brand 2016-10-06 14:21:08 +02:00
parent abbbca02b0
commit 8d2788c543

View File

@ -77,6 +77,9 @@
* for this room, and if so use it. * for this room, and if so use it.
* Otherwise delegate to the super method. * Otherwise delegate to the super method.
*/ */
if (_.isUndefined(converse.bookmarks)) {
return;
}
var model = converse.bookmarks.findWhere({'jid': this.model.get('jid')}); var model = converse.bookmarks.findWhere({'jid': this.model.get('jid')});
if (!_.isUndefined(model) && model.get('nick')) { if (!_.isUndefined(model) && model.get('nick')) {
this.join(this.model.get('nick')); this.join(this.model.get('nick'));