Skip to content

Commit

Permalink
fix #3159
Browse files Browse the repository at this point in the history
  • Loading branch information
howardchung authored Mar 12, 2024
1 parent 08e8019 commit 8e5df9d
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 @@ -8,7 +8,8 @@ export default function transformPlayerMatches(fields) {
if (fields.included_account_id && !Array.isArray(fields.included_account_id)) {
return response.map((match) => {
let sameTeam = false;
const partnerHero = Object.values(match.heroes).find(hero => hero.account_id && hero.account_id.toString() === fields.included_account_id);
const match = Object.entries(match.heroes).find(([key, val]) => val.account_id && val.account_id.toString() === fields.included_account_id);
const partnerHero = {...match?.val, player_slot: match?.key};
if (isRadiant(partnerHero.player_slot) === isRadiant(match.player_slot)) {
sameTeam = true;
}
Expand Down

0 comments on commit 8e5df9d

Please sign in to comment.