Fix clean type in v14

This commit is contained in:
Carlos Fernandez 2026-03-13 18:09:19 -04:00
parent fb4ddf227c
commit 92bcaf4962
2 changed files with 4 additions and 4 deletions

View file

@ -87,10 +87,10 @@ export class ActionField extends foundry.data.fields.ObjectField {
/* -------------------------------------------- */ /* -------------------------------------------- */
/** @override */ /** @override */
_cleanType(value, options) { _cleanType(value, options, _state) {
if (!(typeof value === 'object')) value = {}; if (!(typeof value === 'object')) value = {};
const cls = this.getModel(value); const cls = this.getModel(value);
if (cls) return cls.cleanData(value, options); if (cls) return cls.cleanData(value, options, _state);
return value; return value;
} }

View file

@ -52,8 +52,8 @@ class ResourcesField extends fields.TypedObjectField {
return key in CONFIG.DH.RESOURCE[this.actorType].all; return key in CONFIG.DH.RESOURCE[this.actorType].all;
} }
_cleanType(value, options) { _cleanType(value, options, _state) {
value = super._cleanType(value, options); value = super._cleanType(value, options, _state);
// If not partial, ensure all data exists // If not partial, ensure all data exists
if (!options.partial) { if (!options.partial) {