1
0
mirror of https://github.com/laurent22/joplin.git synced 2025-11-29 22:48:10 +02:00

All: Fixed: Prevents notes with no title to break after synchronize (#1472)

Tests to confirm serialize/unserialize don't change body and title

check if item title exists, otherwise display default title.

added test checking serializing/unserializing Folders don't modify data
This commit is contained in:
Luis Orozco
2019-05-06 15:25:14 -05:00
committed by Laurent Cozic
parent 782aae4ddf
commit d213e4ab57
3 changed files with 44 additions and 2 deletions

View File

@@ -279,7 +279,7 @@ class BaseItem extends BaseModel {
let temp = [];
if (output.title) temp.push(output.title);
if (typeof output.title === "string") temp.push(output.title);
if (output.body) temp.push(output.body);
if (output.props.length) temp.push(output.props.join("\n"));
@@ -644,7 +644,7 @@ class BaseItem extends BaseModel {
static displayTitle(item) {
if (!item) return '';
return !!item.encryption_applied ? '🔑 ' + _('Encrypted') : item.title + '';
return !!item.encryption_applied ? '🔑 ' + _('Encrypted') : (!!item.title)? item.title + '' : Note.defaultTitle(item);
}
static async markAllNonEncryptedForSync() {