Fix conflict

This commit is contained in:
Carlos Fernandez 2026-03-18 18:47:16 -04:00
commit f949e859ee
6 changed files with 23 additions and 16 deletions

View file

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

View file

@ -757,7 +757,6 @@ export default class DhCharacter extends DhCreature {
static migrateData(source) {
if (typeof source.scars === 'object') source.scars = 0;
if (source.resources?.hope?.max) source.scars = Math.max(6 - source.resources.hope.max, 0);
return super.migrateData(source);
}