mirror of
https://github.com/zadam/trilium.git
synced 2025-01-02 21:32:51 +08:00
fix timing issue when saving changes to notes
This commit is contained in:
parent
cfa4cc4931
commit
85215aa440
1 changed files with 4 additions and 1 deletions
|
@ -99,11 +99,14 @@ async function saveNote() {
|
|||
note.title = $noteTitle.val();
|
||||
note.content = getComponent(note.type).getContent();
|
||||
|
||||
// it's important to set the flag back to false immediatelly after retrieving title and content
|
||||
// otherwise we might overwrite another change (especially async code)
|
||||
isNoteChanged = false;
|
||||
|
||||
treeService.setNoteTitle(note.noteId, note.title);
|
||||
|
||||
await server.put('notes/' + note.noteId, note.dto);
|
||||
|
||||
isNoteChanged = false;
|
||||
|
||||
if (note.isProtected) {
|
||||
protectedSessionHolder.touchProtectedSession();
|
||||
|
|
Loading…
Reference in a new issue