cleanup/fixes of label/relation definition usages in the old style

This commit is contained in:
zadam
2020-09-08 20:42:50 +02:00
parent 80f269d844
commit 8b4cf474bd
5 changed files with 9 additions and 49 deletions

View File

@@ -464,6 +464,12 @@ function saveNoteRevision(note) {
const msSinceDateCreated = now.getTime() - dateUtils.parseDateTime(note.utcDateCreated).getTime();
if (!existingNoteRevisionId && msSinceDateCreated >= noteRevisionSnapshotTimeInterval * 1000) {
const content = note.getContent();
if (!content) {
return;
}
const noteRevision = new NoteRevision({
noteId: note.noteId,
// title and text should be decrypted now
@@ -478,7 +484,7 @@ function saveNoteRevision(note) {
dateCreated: dateUtils.localNowDateTime()
}).save();
noteRevision.setContent(note.getContent());
noteRevision.setContent(content);
}
}