Merge pull request #681 from SISheogorath/fix/420

Ignore empty values for revision.
This commit is contained in:
Christoph (Sheogorath) Kern
2018-01-18 11:22:18 +01:00
committed by GitHub

View File

@@ -237,8 +237,8 @@ module.exports = function (sequelize, DataTypes) {
// if no revision available
Revision.create({
noteId: note.id,
lastContent: note.content,
length: note.content.length,
lastContent: note.content ? note.content : '',
length: note.content ? note.content.length : 0,
authorship: note.authorship
}).then(function (revision) {
Revision.finishSaveNoteRevision(note, revision, callback)