Fixed so that non attack/damage actions don't error out when used

This commit is contained in:
WBHarry 2026-07-21 21:53:36 +02:00
parent 26bcc2dddc
commit 86d0160eb6

View file

@ -429,11 +429,11 @@ export default class DHBaseAction extends ActionMixin(foundry.abstract.DataModel
} }
get hasDamage() { get hasDamage() {
return this.type !== 'healing' && (Boolean(this.damage.main) || !foundry.utils.isEmpty(this.damage.resources)); return this.type !== 'healing' && (Boolean(this.damage?.main) || !foundry.utils.isEmpty(this.damage?.resources));
} }
get hasHealing() { get hasHealing() {
return this.type === 'healing' && !foundry.utils.isEmpty(this.damage.resources); return this.type === 'healing' && !foundry.utils.isEmpty(this.damage?.resources);
} }
get hasSave() { get hasSave() {