mirror of
https://github.com/zadam/trilium.git
synced 2025-12-04 22:44:25 +01:00
edited notes: handle promise rejection
This commit is contained in:
parent
400674325a
commit
01f571e041
@ -22,6 +22,10 @@ export default function EditedNotes({ noteId, dateFilter } : EditedNotesProps) {
|
|||||||
const noteIds = filteredNotes.flatMap((n) => n.noteId);
|
const noteIds = filteredNotes.flatMap((n) => n.noteId);
|
||||||
await froca.getNotes(noteIds, true); // preload all at once
|
await froca.getNotes(noteIds, true); // preload all at once
|
||||||
setEditedNotes(filteredNotes);
|
setEditedNotes(filteredNotes);
|
||||||
|
})
|
||||||
|
.catch(err => {
|
||||||
|
console.error("Failed to fetch edited notes:", err);
|
||||||
|
setEditedNotes([]);
|
||||||
});
|
});
|
||||||
}, [noteId, dateFilter]);
|
}, [noteId, dateFilter]);
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user