Skip to content

Commit

Permalink
fix race graph
Browse files Browse the repository at this point in the history
  • Loading branch information
therungg committed Sep 8, 2024
1 parent 725e9ad commit 59c50da
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions app/races/[race]/race-progress-graph.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,8 @@ const isRaceParticipantSplitMessage = (
message: RaceMessage,
): message is RaceMessage<RaceMessageParticipantSplitData> =>
message.type === "participant-split" ||
message.type === "participant-finish";
message.type === "participant-finish" ||
message.type === "participant-confirm";

export const RaceProgressGraph = ({
race,
Expand Down Expand Up @@ -107,8 +108,7 @@ export const RaceProgressGraph = ({
.filter(isRaceParticipantSplitMessage)
.reverse()
.forEach((message) => {
if (!message.data || !message.data.time || !message.data.percentage)
return;
if (!message.data || !message.data.time) return;
const current = participantsMap.get(message.data.user);
if (!current) return;

Expand Down

0 comments on commit 59c50da

Please sign in to comment.