Skip to content

Commit

Permalink
Update transformPlayerMatches.js
Browse files Browse the repository at this point in the history
  • Loading branch information
howardchung committed Mar 12, 2024
1 parent a98c9e2 commit 56e24d8
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/actions/transformPlayerMatches.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ export default function transformPlayerMatches(fields) {
return response.map((match) => {
let sameTeam = false;
const found = Object.entries(match.heroes).find(([key, val]) => val.account_id && val.account_id.toString() === fields.included_account_id);
const partnerHero = {...found?.val, player_slot: found?.key};
const partnerHero = {...found?.val, player_slot: Number(found?.key)};
if (isRadiant(partnerHero.player_slot) === isRadiant(match.player_slot)) {
sameTeam = true;
}
Expand Down

0 comments on commit 56e24d8

Please sign in to comment.