Merge pull request #681 from SISheogorath/fix/420
Ignore empty values for revision.
This commit is contained in:
commit
86fbdeea7d
1 changed files with 2 additions and 2 deletions
|
@ -237,8 +237,8 @@ module.exports = function (sequelize, DataTypes) {
|
||||||
// if no revision available
|
// if no revision available
|
||||||
Revision.create({
|
Revision.create({
|
||||||
noteId: note.id,
|
noteId: note.id,
|
||||||
lastContent: note.content,
|
lastContent: note.content ? note.content : '',
|
||||||
length: note.content.length,
|
length: note.content ? note.content.length : 0,
|
||||||
authorship: note.authorship
|
authorship: note.authorship
|
||||||
}).then(function (revision) {
|
}).then(function (revision) {
|
||||||
Revision.finishSaveNoteRevision(note, revision, callback)
|
Revision.finishSaveNoteRevision(note, revision, callback)
|
||||||
|
|
Loading…
Reference in a new issue