mirror of
https://github.com/zadam/trilium.git
synced 2025-10-29 01:06:36 +01:00
fix corner case when deleting a note with not yet downloaded images, closes #2073
This commit is contained in:
@@ -362,6 +362,12 @@ function downloadImages(noteId, content) {
|
|||||||
const imageNotes = becca.getNotes(Object.values(imageUrlToNoteIdMapping));
|
const imageNotes = becca.getNotes(Object.values(imageUrlToNoteIdMapping));
|
||||||
|
|
||||||
const origNote = becca.getNote(noteId);
|
const origNote = becca.getNote(noteId);
|
||||||
|
|
||||||
|
if (!origNote) {
|
||||||
|
log.error(`Cannot find note ${noteId} to replace image link.`);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
const origContent = origNote.getContent();
|
const origContent = origNote.getContent();
|
||||||
let updatedContent = origContent;
|
let updatedContent = origContent;
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user