Commit aa9aad91 authored by JC Brand's avatar JC Brand

Handle case where bookmark doesn't exist for some reason

parent 135cbcd0
...@@ -43,10 +43,11 @@ converse.plugins.add('converse-bookmarks', { ...@@ -43,10 +43,11 @@ converse.plugins.add('converse-bookmarks', {
const { _converse } = this.__super__; const { _converse } = this.__super__;
if (this.get('bookmarked') && _converse.bookmarks) { if (this.get('bookmarked') && _converse.bookmarks) {
const bookmark = _converse.bookmarks.findWhere({'jid': this.get('jid')}); const bookmark = _converse.bookmarks.findWhere({'jid': this.get('jid')});
return bookmark.get('name'); if (bookmark) {
} else { return bookmark.get('name');
return this.__super__.getDisplayName.apply(this, arguments); }
} }
return this.__super__.getDisplayName.apply(this, arguments);
}, },
getAndPersistNickname (nick) { getAndPersistNickname (nick) {
......
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