mirror of
https://github.com/zadam/trilium.git
synced 2025-10-29 17:26:38 +01:00
uploading new image revisions, WIP
This commit is contained in:
@@ -373,15 +373,11 @@ async function updateNote(noteId, noteUpdates) {
|
||||
note.isProtected = noteUpdates.isProtected;
|
||||
await note.save();
|
||||
|
||||
// this might be simplified to just !== undefined
|
||||
if (!['file', 'image', 'render'].includes(note.type)) {
|
||||
if (noteUpdates.content !== undefined && noteUpdates.content !== null) {
|
||||
noteUpdates.content = await saveLinks(note, noteUpdates.content);
|
||||
|
||||
await note.setContent(noteUpdates.content);
|
||||
}
|
||||
else if (noteUpdates.content) {
|
||||
await note.setContent(noteUpdates.content);
|
||||
}
|
||||
|
||||
if (noteTitleChanged) {
|
||||
await triggerNoteTitleChanged(note);
|
||||
|
||||
Reference in New Issue
Block a user