Skip to content

Commit

Permalink
Fix an issue where a player in validateMap was not defined.
Browse files Browse the repository at this point in the history
GitOrigin-RevId: 0fb684561fe4171da30709ab4abbce3b662b32b8
  • Loading branch information
cpojer committed May 27, 2024
1 parent ea714ac commit 803185b
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions athena/lib/validateMap.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -378,7 +378,7 @@ export default function validateMap(

const teams = ImmutableMap(
active.map((id) => {
const player = map.getPlayer(id);
const player = map.maybeGetPlayer(id);
return [
id,
new Team(
Expand All @@ -390,10 +390,10 @@ export default function validateMap(
toPlayerID(id),
id,
0,
player.ai != null && AIRegistry.has(player.ai)
player?.ai != null && AIRegistry.has(player.ai)
? player.ai
: undefined,
player.skills,
player?.skills || new Set(),
),
),
),
Expand Down

0 comments on commit 803185b

Please sign in to comment.