From b6f09ad343f63b8cca8d356f138a2bc28d2526c0 Mon Sep 17 00:00:00 2001 From: mbergen Date: Mon, 16 Dec 2024 10:25:51 +0100 Subject: [PATCH] fix(match2): Prevent premature return in match legacy on AoE (#5213) fix(match2) Prevent premature return in match legacy --- .../match2/wikis/ageofempires/match_legacy.lua | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/components/match2/wikis/ageofempires/match_legacy.lua b/components/match2/wikis/ageofempires/match_legacy.lua index 73a3cf225c..2997af52d6 100644 --- a/components/match2/wikis/ageofempires/match_legacy.lua +++ b/components/match2/wikis/ageofempires/match_legacy.lua @@ -44,12 +44,13 @@ function MatchLegacy.storeGames(match, match2) Array.forEach(opponents, function(opponent, opponentIndex) -- opponent.players can have gaps for _, player in pairs(opponent.players) do - if Table.isEmpty(player) then return end - local prefix = 'o' .. opponentIndex .. 'p' .. player.index - game.extradata[prefix] = player.pageName - game.extradata[prefix .. 'faction'] = player.civ - game.extradata[prefix .. 'name'] = player.displayname - game.extradata[prefix .. 'flag'] = player.flag + if Table.isNotEmpty(player) then + local prefix = 'o' .. opponentIndex .. 'p' .. player.index + game.extradata[prefix] = player.pageName + game.extradata[prefix .. 'faction'] = player.civ + game.extradata[prefix .. 'name'] = player.displayname + game.extradata[prefix .. 'flag'] = player.flag + end end end) elseif game.mode == '1v1' then