Skip to content

Commit

Permalink
Guard for rare undefined label issue in the editor.
Browse files Browse the repository at this point in the history
GitOrigin-RevId: 2c18f7034525ca823739415442eeefc8920a5fdf
  • Loading branch information
cpojer committed Mar 7, 2025
1 parent 33df8a4 commit c8c7bc7
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion athena/Objectives.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -952,7 +952,9 @@ export function getInitialObjective(
const hidden = false;
const optional = false;
const currentPlayer = map.getCurrentPlayer().id;
const players = [currentPlayer > 0 ? currentPlayer : map.active[0]];
const players = [
(currentPlayer > 0 ? currentPlayer : map.active[0]) || PlayerIDs[1],
];
const label = new Set(players);
switch (criteria) {
case Criteria.Default:
Expand Down

0 comments on commit c8c7bc7

Please sign in to comment.