fix isProtected consistency for images and files + related consistency check

This commit is contained in:
zadam
2019-03-08 22:25:12 +01:00
parent ae17e4dc60
commit a432ad7483
4 changed files with 20 additions and 8 deletions

View File

@@ -117,7 +117,10 @@ async function saveNote() {
}
note.title = $noteTitle.val();
note.noteContent.content = getCurrentNoteContent(note);
if (note.noteContent != null) { // might be null for file/image
note.noteContent.content = getCurrentNoteContent(note);
}
// 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)