Skip to content

Commit

Permalink
refactor: 🥅 handle bad data in transformed legacy tournaments
Browse files Browse the repository at this point in the history
  • Loading branch information
CourtHive committed Apr 1, 2024
1 parent 52cc39b commit 0a73edc
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/query/participants/getParticipantMap.ts
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,11 @@ export function getParticipantMap({

const { participantId, individualParticipantIds, participantType } = participantCopy;

if (!participantMap[participantId]) {
missingParticipantIds.push(participantId);
continue;
}

Object.assign(participantMap[participantId].participant, participantCopy);

if (individualParticipantIds) {
Expand Down

0 comments on commit 0a73edc

Please sign in to comment.