parent
8375544dea
commit
8bf8a1aef1
1 changed files with 2 additions and 2 deletions
|
@ -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)
|
||||
|
|
Loading…
Reference in a new issue