Skip to content

Commit a77b508

Browse files
committed
Fix exception when bookmark name is not defined
1 parent a74068b commit a77b508

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/headless/plugins/bookmarks/model.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,12 +4,12 @@ import converse from '../../shared/api/public.js';
44
const { Strophe } = converse.env;
55

66
class Bookmark extends Model {
7-
get idAttribute () {
7+
get idAttribute() {
88
return 'jid';
99
}
1010

11-
getDisplayName () {
12-
return Strophe.xmlunescape(this.get('name')) || this.get('jid');
11+
getDisplayName() {
12+
return this.get('name') && Strophe.xmlunescape(this.get('name')) || this.get('jid');
1313
}
1414
}
1515

0 commit comments

Comments
 (0)