Skip to content

Commit

Permalink
fix var names
Browse files Browse the repository at this point in the history
  • Loading branch information
howardchung committed Mar 12, 2024
1 parent 56e24d8 commit 053d556
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/actions/transformPlayerMatches.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,8 @@ 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: Number(found?.key)};
const partnerHero = {...found?.[1], player_slot: Number(found?.[0])};
console.log(partnerHero, match);
if (isRadiant(partnerHero.player_slot) === isRadiant(match.player_slot)) {
sameTeam = true;
}
Expand Down

0 comments on commit 053d556

Please sign in to comment.