fix corner case when deleting a note with not yet downloaded images, closes #2073

This commit is contained in:
zadam 2021-07-21 20:18:03 +02:00
parent f3959cf2aa
commit adc98d4515

View File

@ -362,6 +362,12 @@ function downloadImages(noteId, content) {
const imageNotes = becca.getNotes(Object.values(imageUrlToNoteIdMapping));
const origNote = becca.getNote(noteId);
if (!origNote) {
log.error(`Cannot find note ${noteId} to replace image link.`);
return;
}
const origContent = origNote.getContent();
let updatedContent = origContent;