You've already forked joplin
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:
@ -92,6 +92,16 @@ class BaseModel {
|
||||
return this.db().tableFields(this.tableName());
|
||||
}
|
||||
|
||||
static removeUnknownFields(model) {
|
||||
const newModel = {};
|
||||
for (let n in model) {
|
||||
if (!model.hasOwnProperty(n)) continue;
|
||||
if (!this.hasField(n) && n !== 'type_') continue;
|
||||
newModel[n] = model[n];
|
||||
}
|
||||
return newModel;
|
||||
}
|
||||
|
||||
static new() {
|
||||
let fields = this.fields();
|
||||
let output = {};
|
||||
|
Reference in New Issue
Block a user