1
0
mirror of https://github.com/laurent22/joplin.git synced 2025-06-15 23:00:36 +02:00

All: Resolves #918: Skip properties that are on sync target but not handled by local client

This commit is contained in:
Laurent Cozic
2018-10-31 00:35:57 +00:00
parent 990591cc80
commit e41896d6f3
3 changed files with 34 additions and 7 deletions

View File

@ -224,7 +224,7 @@ class BaseItem extends BaseModel {
static unserialize_format(type, propName, propValue) {
if (propName[propName.length - 1] == '_') return propValue; // Private property
let ItemClass = this.itemClass(type);
const ItemClass = this.itemClass(type);
if (['created_time', 'updated_time', 'user_created_time', 'user_updated_time'].indexOf(propName) >= 0) {
if (!propValue) return 0;
@ -378,6 +378,9 @@ class BaseItem extends BaseModel {
if (output.type_ === BaseModel.TYPE_NOTE) output.body = body.join("\n");
const ItemClass = this.itemClass(output.type_);
output = ItemClass.removeUnknownFields(output);
for (let n in output) {
if (!output.hasOwnProperty(n)) continue;
output[n] = await this.unserialize_format(output.type_, n, output[n]);