mirror of
https://github.com/zadam/trilium.git
synced 2025-11-14 17:25:52 +01:00
add ignoreMissing flag to becca's getNotes()
This commit is contained in:
@@ -55,13 +55,17 @@ class Becca {
|
||||
return this.notes[noteId];
|
||||
}
|
||||
|
||||
getNotes(noteIds) {
|
||||
getNotes(noteIds, ignoreMissing = false) {
|
||||
const filteredNotes = [];
|
||||
|
||||
for (const noteId of noteIds) {
|
||||
const note = this.notes[noteId];
|
||||
|
||||
if (!note) {
|
||||
if (ignoreMissing) {
|
||||
continue;
|
||||
}
|
||||
|
||||
throw new Error(`Note '${noteId}' was not found in becca.`);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user