Check for valid bookmark property

This commit is contained in:
Ramon Wenger 2019-10-15 13:46:16 +02:00
parent 1d5603ed5f
commit 4fc896c224
1 changed files with 2 additions and 2 deletions

View File

@ -59,10 +59,10 @@
computed: {
bookmarked() {
return !!this.bookmarks.find(bookmark => bookmark.uuid === this.component.id);
return this.bookmarks && !!this.bookmarks.find(bookmark => bookmark.uuid === this.component.id);
},
note() {
const bookmark = this.bookmarks.find(bookmark => bookmark.uuid === this.component.id);
const bookmark = this.bookmarks && this.bookmarks.find(bookmark => bookmark.uuid === this.component.id);
return bookmark && bookmark.note;
}
},