Fixed so the combat tracker doesn't error out if a combatant has no attached token

This commit is contained in:
WBHarry 2026-06-01 12:20:25 +02:00
parent 318d00b47d
commit 84d72b5295

View file

@ -133,7 +133,7 @@ export default class DhCombatTracker extends foundry.applications.sidebar.tabs.C
canPing: combatant.sceneId === canvas.scene?.id && game.user.hasPermission('PING_CANVAS'), canPing: combatant.sceneId === canvas.scene?.id && game.user.hasPermission('PING_CANVAS'),
type: combatant.actor?.system?.type, type: combatant.actor?.system?.type,
img: await this._getCombatantThumbnail(combatant), img: await this._getCombatantThumbnail(combatant),
disposition: combatant.token.disposition disposition: combatant.token?.disposition
}; };
turn.css = [turn.active ? 'active' : null, hidden ? 'hide' : null, isDefeated ? 'defeated' : null].filterJoin( turn.css = [turn.active ? 'active' : null, hidden ? 'hide' : null, isDefeated ? 'defeated' : null].filterJoin(