Temp ActionField attack type missing (#923)

This commit is contained in:
Dapoulp 2025-08-14 00:25:03 +02:00 committed by GitHub
parent 24114fbdf6
commit 94c235bc08
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -102,6 +102,7 @@ export class ActionField extends foundry.data.fields.ObjectField {
/** @override */ /** @override */
initialize(value, model, options = {}) { initialize(value, model, options = {}) {
if(value && !value.type) value.type = 'attack';
const cls = this.getModel(value); const cls = this.getModel(value);
if (cls) return new cls(value, { parent: model, ...options }); if (cls) return new cls(value, { parent: model, ...options });
return foundry.utils.deepClone(value); return foundry.utils.deepClone(value);