mirror of
https://github.com/zadam/trilium.git
synced 2025-06-06 18:08:33 +02:00
fix corner case when deleting a note with not yet downloaded images, closes #2073
This commit is contained in:
parent
f3959cf2aa
commit
adc98d4515
@ -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;
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user