fixes for undefined parent note #3066

This commit is contained in:
zadam
2022-08-16 23:46:56 +02:00
parent 78bca2477d
commit 8abcf571e8
4 changed files with 7 additions and 5 deletions

View File

@@ -105,7 +105,7 @@ class Branch extends AbstractEntity {
return this.childNote;
}
/** @returns {Note} */
/** @returns {Note|undefined} - root branch will have undefined parent, all other branches have to have a parent note */
get parentNote() {
if (!(this.parentNoteId in this.becca.notes) && this.parentNoteId !== 'none') {
// entities can come out of order in sync/import, create skeleton which will be filled later