From 8e5df9d182a73e8780ea3fbae2fdc7b5d423bdb1 Mon Sep 17 00:00:00 2001 From: Howard Chung Date: Mon, 11 Mar 2024 23:07:10 -0700 Subject: [PATCH] fix #3159 --- src/actions/transformPlayerMatches.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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; }