mirror of
https://github.com/zadam/trilium.git
synced 2025-03-01 14:22:32 +01:00
avoid errors from missing note cache during startup
This commit is contained in:
parent
ba33a0d330
commit
9d7d79ef94
@ -25,6 +25,10 @@ eventService.subscribe(eventService.NOTE_TITLE_CHANGED, note => {
|
|||||||
if (!note.isRoot()) {
|
if (!note.isRoot()) {
|
||||||
const noteFromCache = noteCache.notes[note.noteId];
|
const noteFromCache = noteCache.notes[note.noteId];
|
||||||
|
|
||||||
|
if (!noteFromCache) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
for (const parentNote of noteFromCache.parents) {
|
for (const parentNote of noteFromCache.parents) {
|
||||||
if (parentNote.hasLabel("sorted")) {
|
if (parentNote.hasLabel("sorted")) {
|
||||||
treeService.sortNotesAlphabetically(parentNote.noteId);
|
treeService.sortNotesAlphabetically(parentNote.noteId);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user