From d377af8d89a6ab71c6e8b8b1c3bdb8f1d7718508 Mon Sep 17 00:00:00 2001 From: rtrembecky Date: Sun, 10 Dec 2023 04:04:16 +0100 Subject: [PATCH] fix null upcoming event publication access --- .../competition/competition/UpcomingOrCurrentEvent.tsx | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/components/Admin/resources/competition/competition/UpcomingOrCurrentEvent.tsx b/src/components/Admin/resources/competition/competition/UpcomingOrCurrentEvent.tsx index 661109a0..57ece373 100644 --- a/src/components/Admin/resources/competition/competition/UpcomingOrCurrentEvent.tsx +++ b/src/components/Admin/resources/competition/competition/UpcomingOrCurrentEvent.tsx @@ -37,7 +37,8 @@ export const UpcomingOrCurrentEvent: FC = () => { source="publication_set" label="Publication count" - render={(record) => record && {record['publication_set'].length}} + // optional access because of weird behavior of nested FunctionFields for null record + render={(record) => record && {record['publication_set']?.length}} />