edited notes: handle promise rejection

This commit is contained in:
contributor 2025-11-21 16:49:25 +02:00
parent 400674325a
commit 01f571e041

View File

@ -22,6 +22,10 @@ export default function EditedNotes({ noteId, dateFilter } : EditedNotesProps) {
const noteIds = filteredNotes.flatMap((n) => n.noteId);
await froca.getNotes(noteIds, true); // preload all at once
setEditedNotes(filteredNotes);
})
.catch(err => {
console.error("Failed to fetch edited notes:", err);
setEditedNotes([]);
});
}, [noteId, dateFilter]);