diff --git a/src/actions/transformPlayerMatches.js b/src/actions/transformPlayerMatches.js index 53e4f9537a..c071341275 100644 --- a/src/actions/transformPlayerMatches.js +++ b/src/actions/transformPlayerMatches.js @@ -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; }