From bc74c1f0cb4e146d7944cea37fb1afbe6772fd71 Mon Sep 17 00:00:00 2001 From: Wu Cheng-Han Date: Tue, 11 Oct 2016 00:55:38 +0800 Subject: Fix doc updating revision not stringify and compress authorship before save --- lib/models/note.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'lib') diff --git a/lib/models/note.js b/lib/models/note.js index 6efa5d4f..7fdc5645 100644 --- a/lib/models/note.js +++ b/lib/models/note.js @@ -142,7 +142,7 @@ module.exports = function (sequelize, DataTypes) { authorship = Note.updateAuthorshipByOperation(operations[i], null, authorship); } note.update({ - authorship: authorship + authorship: LZString.compressToBase64(JSON.stringify(authorship)) }).then(function (note) { return callback(null, note.id); }).catch(function (err) { -- cgit v1.2.3