mirror of
https://github.com/Foundryborne/daggerheart.git
synced 2026-04-21 15:03:37 +02:00
Fix clean type in v14
This commit is contained in:
parent
fb4ddf227c
commit
92bcaf4962
2 changed files with 4 additions and 4 deletions
|
|
@ -87,10 +87,10 @@ export class ActionField extends foundry.data.fields.ObjectField {
|
|||
/* -------------------------------------------- */
|
||||
|
||||
/** @override */
|
||||
_cleanType(value, options) {
|
||||
_cleanType(value, options, _state) {
|
||||
if (!(typeof value === 'object')) value = {};
|
||||
const cls = this.getModel(value);
|
||||
if (cls) return cls.cleanData(value, options);
|
||||
if (cls) return cls.cleanData(value, options, _state);
|
||||
return value;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -52,8 +52,8 @@ class ResourcesField extends fields.TypedObjectField {
|
|||
return key in CONFIG.DH.RESOURCE[this.actorType].all;
|
||||
}
|
||||
|
||||
_cleanType(value, options) {
|
||||
value = super._cleanType(value, options);
|
||||
_cleanType(value, options, _state) {
|
||||
value = super._cleanType(value, options, _state);
|
||||
|
||||
// If not partial, ensure all data exists
|
||||
if (!options.partial) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue