From f9722da7884ee0c14309aff3bcf4e446d1b2bf58 Mon Sep 17 00:00:00 2001 From: Kevin Matthews <49137025+kr-matthews@users.noreply.github.com> Date: Mon, 27 Jan 2025 01:33:18 -0800 Subject: [PATCH] Handle registrations null case (#10688) --- .../RegistrationsV2/Registrations/RegistrationList.jsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/webpacker/components/RegistrationsV2/Registrations/RegistrationList.jsx b/app/webpacker/components/RegistrationsV2/Registrations/RegistrationList.jsx index 75ecacf0db..689ef91be7 100644 --- a/app/webpacker/components/RegistrationsV2/Registrations/RegistrationList.jsx +++ b/app/webpacker/components/RegistrationsV2/Registrations/RegistrationList.jsx @@ -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 }; }); }