mirror of
https://github.com/zadam/trilium.git
synced 2025-11-02 03:16:11 +01:00
note map refactoring
This commit is contained in:
@@ -745,11 +745,15 @@ class Note extends AbstractEntity {
|
||||
}
|
||||
|
||||
/** @return {Note[]} */
|
||||
getSubtreeNotes() {
|
||||
getSubtreeNotes(includeArchived = true) {
|
||||
if (this.isArchived) {
|
||||
return [];
|
||||
}
|
||||
|
||||
const arr = [[this]];
|
||||
|
||||
for (const childNote of this.children) {
|
||||
arr.push(childNote.getSubtreeNotes());
|
||||
arr.push(childNote.getSubtreeNotes(includeArchived));
|
||||
}
|
||||
|
||||
return arr.flat();
|
||||
|
||||
Reference in New Issue
Block a user