fix error when saving unprotected notes

This commit is contained in:
azivner
2017-11-17 18:56:52 -05:00
parent a6bf04f8d4
commit c4a9aaa52d
3 changed files with 12 additions and 3 deletions

View File

@@ -166,7 +166,7 @@ async function updateNote(noteId, newNote, ctx) {
await sync_table.addNoteHistorySync(newNoteHistoryId);
}
await protectNoteHistory(noteId, ctx.getDataKey(), newNote.detail.is_protected);
await protectNoteHistory(noteId, ctx.getDataKeyOrNull(), newNote.detail.is_protected);
await addNoteAudits(origNoteDetail, newNote.detail, ctx.browserId);