mirror of
https://github.com/zadam/trilium.git
synced 2025-11-02 03:16:11 +01:00
expose root node, fixes #101
This commit is contained in:
@@ -58,6 +58,10 @@ class TreeCache {
|
||||
|
||||
/** @return NoteShort */
|
||||
async getNote(noteId) {
|
||||
if (noteId === 'none') {
|
||||
return null;
|
||||
}
|
||||
|
||||
return (await this.getNotes([noteId]))[0];
|
||||
}
|
||||
|
||||
@@ -68,6 +72,10 @@ class TreeCache {
|
||||
}
|
||||
|
||||
addBranchRelationship(branchId, childNoteId, parentNoteId) {
|
||||
if (parentNoteId === 'none') { // applies only to root element
|
||||
return;
|
||||
}
|
||||
|
||||
this.childParentToBranch[childNoteId + '-' + parentNoteId] = branchId;
|
||||
|
||||
this.parents[childNoteId] = this.parents[childNoteId] || [];
|
||||
|
||||
Reference in New Issue
Block a user