Skip to content

Commit

Permalink
ensure it's always set in the end
Browse files Browse the repository at this point in the history
  • Loading branch information
Rathoz committed Oct 9, 2024
1 parent b7d33b3 commit 2057e0f
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions components/match2/commons/match.lua
Original file line number Diff line number Diff line change
Expand Up @@ -385,9 +385,9 @@ end
function Match._prepareGameRecordForStore(matchRecord, gameRecord)
gameRecord.parent = matchRecord.parent
gameRecord.tournament = matchRecord.tournament
if not gameRecord.participants and gameRecord.opponents then
if not gameRecord.participants then
gameRecord.participants = {}
for opponentId, opponent in ipairs(gameRecord.opponents) do
for opponentId, opponent in ipairs(gameRecord.opponents or {}) do
for playerId, player in pairs(opponent.players) do
-- Deep copy have to be used here, otherwise a json.stringify complains about circular references
-- between participants and opponents
Expand Down

0 comments on commit 2057e0f

Please sign in to comment.