You've already forked joplin
mirror of
https://github.com/laurent22/joplin.git
synced 2025-12-05 22:57:29 +02:00
All: Fixed note update issue
This commit is contained in:
@@ -35,9 +35,14 @@ shared.saveNoteButton_press = async function(comp) {
|
||||
}
|
||||
|
||||
// Save only the properties that have changed
|
||||
const diff = BaseModel.diffObjects(comp.state.lastSavedNote, note);
|
||||
diff.type_ = note.type_;
|
||||
diff.id = note.id;
|
||||
let diff = null;
|
||||
if (!isNew) {
|
||||
diff = BaseModel.diffObjects(comp.state.lastSavedNote, note);
|
||||
diff.type_ = note.type_;
|
||||
diff.id = note.id;
|
||||
} else {
|
||||
diff = Object.assign({}, note);
|
||||
}
|
||||
|
||||
const savedNote = await Note.save(diff);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user