1
0
mirror of https://github.com/laurent22/joplin.git synced 2025-12-14 23:26:58 +02:00

Fixed note serialization and edition

This commit is contained in:
Laurent Cozic
2017-07-13 22:26:45 +01:00
parent 1b50bfe960
commit 4b07092a75
5 changed files with 37 additions and 15 deletions

View File

@@ -27,7 +27,10 @@ class Note extends BaseItem {
static async unserializeForEdit(content) {
content += "\n\ntype_: " + BaseModel.TYPE_NOTE;
return super.unserialize(content);
let output = await super.unserialize(content);
if (!output.title) output.title = '';
if (!output.body) output.body = '';
return output;
}
static async serializeAllProps(note) {