reimplemented expand/collapse differently for better performance

This commit is contained in:
zadam
2020-05-03 13:15:08 +02:00
parent 742df25bc2
commit 2a3091f788
7 changed files with 51 additions and 47 deletions

View File

@@ -246,10 +246,10 @@ class TreeCache {
return this.notes[noteId];
}
getBranches(branchIds) {
getBranches(branchIds, silentNotFoundError = false) {
return branchIds
.map(branchId => this.getBranch(branchId))
.filter(b => b !== null);
.map(branchId => this.getBranch(branchId, silentNotFoundError))
.filter(b => !!b);
}
/** @return {Branch} */