mirror of
https://github.com/Foundryborne/daggerheart.git
synced 2026-01-12 11:41:08 +01:00
CombatTracker was throwing an error when there were no combatants
This commit is contained in:
parent
57fdf9e07d
commit
47a6abddfb
2 changed files with 8 additions and 4 deletions
|
|
@ -30,8 +30,8 @@ export default class DhCombatTracker extends foundry.applications.sidebar.tabs.C
|
|||
async _prepareTrackerContext(context, options) {
|
||||
await super._prepareTrackerContext(context, options);
|
||||
|
||||
const adversaries = context.turns.filter(x => x.isNPC);
|
||||
const characters = context.turns.filter(x => !x.isNPC);
|
||||
const adversaries = context.turns?.filter(x => x.isNPC) ?? [];
|
||||
const characters = context.turns?.filter(x => !x.isNPC) ?? [];
|
||||
|
||||
Object.assign(context, {
|
||||
actionTokens: game.settings.get(SYSTEM.id, SYSTEM.SETTINGS.gameSettings.variantRules).actionTokens,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue