Skip to content

Commit

Permalink
Handle registrations null case (#10688)
Browse files Browse the repository at this point in the history
  • Loading branch information
kr-matthews authored Jan 27, 2025
1 parent 1bbb6b6 commit f9722da
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ export default function RegistrationList({ competitionInfo, userId }) {
const registrationsWithPsychSheet = useMemo(() => {
if (psychSheet !== undefined) {
return psychSheet.sorted_rankings.map((p) => {
const registrationEntry = registrations.find((r) => p.user_id === r.user_id);
const registrationEntry = registrations?.find((r) => p.user_id === r.user_id) || {};
return { ...p, ...registrationEntry };
});
}
Expand Down

0 comments on commit f9722da

Please sign in to comment.