We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 8375544 commit 8bf8a1aCopy full SHA for 8bf8a1a
lib/models/revision.js
@@ -237,8 +237,8 @@ module.exports = function (sequelize, DataTypes) {
237
// if no revision available
238
Revision.create({
239
noteId: note.id,
240
- lastContent: note.content,
241
- length: note.content.length,
+ lastContent: note.content ? note.content : '',
+ length: note.content ? note.content.length : 0,
242
authorship: note.authorship
243
}).then(function (revision) {
244
Revision.finishSaveNoteRevision(note, revision, callback)
0 commit comments