mirror of
https://github.com/Foundryborne/daggerheart.git
synced 2026-03-07 14:36:13 +01:00
Initial v14 fixes
This commit is contained in:
parent
b374070809
commit
1a928e950c
19 changed files with 197 additions and 180 deletions
|
|
@ -111,9 +111,17 @@ export class ActionField extends foundry.data.fields.ObjectField {
|
|||
* @param {object} sourceData Candidate source data of the root model.
|
||||
* @param {any} fieldData The value of this field within the source data.
|
||||
*/
|
||||
migrateSource(sourceData, fieldData) {
|
||||
const cls = this.getModel(fieldData);
|
||||
if (cls) cls.migrateDataSafe(fieldData);
|
||||
_migrate(sourceData, _fieldData) {
|
||||
const source = sourceData ?? this.options.initial;
|
||||
if (!source) return sourceData;
|
||||
|
||||
const cls = this.getModel(source);
|
||||
if (cls) {
|
||||
cls.migrateDataSafe(source);
|
||||
return source;
|
||||
}
|
||||
|
||||
return sourceData;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue