mirror of
https://github.com/Foundryborne/daggerheart.git
synced 2026-03-07 14:36:13 +01:00
Also migrate sub fields of MappingField
This commit is contained in:
parent
aa85eb89bf
commit
d7386a93fe
1 changed files with 10 additions and 0 deletions
|
|
@ -125,4 +125,14 @@ export default class MappingField extends foundry.data.fields.ObjectField {
|
||||||
path.shift();
|
path.shift();
|
||||||
return this.model._getField(path);
|
return this.model._getField(path);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* -------------------------------------------- */
|
||||||
|
|
||||||
|
migrateSource(sourceData, fieldData) {
|
||||||
|
for (const key of Object.keys(fieldData)) {
|
||||||
|
const isDeletion = foundry.utils.isDeletionKey(key);
|
||||||
|
if (isDeletion && key[0] === '-') continue;
|
||||||
|
this.model.migrateSource(sourceData, fieldData[key]);
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue