Skip to content

Commit

Permalink
fix(combat): look up claims properly (#1335)
Browse files Browse the repository at this point in the history
* fixes a bug where new combats don't have flags, resulting in a blank tracker
  • Loading branch information
wrycu authored Jan 29, 2024
1 parent 0990d3e commit 4310350
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion modules/combat-ffg.js
Original file line number Diff line number Diff line change
Expand Up @@ -216,7 +216,11 @@ export class CombatFFG extends Combat {
* @returns {*|*[]} - a list of combatant IDs (NOT token IDs, NOT actor IDs)
*/
getClaims(round) {
return this.getFlag('starwarsffg', 'combatClaims')[round] || [];
const combatClaims = this.getFlag('starwarsffg', 'combatClaims');
if (combatClaims) {
return combatClaims[round] || [];
}
return [];
}

/**
Expand Down

0 comments on commit 4310350

Please sign in to comment.