Commit 03fbe96f authored by nanahira's avatar nanahira

add edge cond for display line

parent 9571b57c
......@@ -52,9 +52,9 @@ export class MatchWrapper {
}
getDisplayLine(player1Name: string, player2Name: string) {
return `${player1Name} ${
return `${player1Name || '???'} ${
this.match.scores_csv || '未开始'
} ${player2Name}`;
} ${player2Name || '???'}`;
}
}
......@@ -212,10 +212,10 @@ export class TournamentWrapper {
const currentMatchInfo = match.match;
const player1Name = this.getParticipantFromParticipantId(
currentMatchInfo.player1_id,
).participant.name;
)?.participant.name;
const player2Name = this.getParticipantFromParticipantId(
currentMatchInfo.player2_id,
).participant.name;
)?.participant.name;
return match.getDisplayLine(player1Name, player2Name);
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment