mirror of
https://github.com/zadam/trilium.git
synced 2025-06-06 18:08:33 +02:00
fix removing stale branches from saved search after refresh, fixes #1354
This commit is contained in:
parent
82f410f695
commit
4f75b6aaaf
@ -203,6 +203,11 @@ class TreeCache {
|
||||
// force to load all the notes at once instead of one by one
|
||||
await this.getNotes(searchResultNoteIds);
|
||||
|
||||
// reset all the virtual branches from old search results
|
||||
if (note.noteId in treeCache.notes) {
|
||||
treeCache.notes[note.noteId].children = [];
|
||||
}
|
||||
|
||||
const branches = resp.branches.filter(b => b.noteId === note.noteId || b.parentNoteId === note.noteId);
|
||||
|
||||
searchResultNoteIds.forEach((resultNoteId, index) => branches.push({
|
||||
|
Loading…
x
Reference in New Issue
Block a user