Skip to content

Commit

Permalink
fix null upcoming event publication access
Browse files Browse the repository at this point in the history
  • Loading branch information
rtrembecky committed Dec 10, 2023
1 parent 86bffa7 commit d377af8
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,8 @@ export const UpcomingOrCurrentEvent: FC = () => {
<FunctionField<RaRecord>
source="publication_set"
label="Publication count"
render={(record) => record && <span>{record['publication_set'].length}</span>}
// optional access because of weird behavior of nested FunctionFields for null record
render={(record) => record && <span>{record['publication_set']?.length}</span>}
/>
</SimpleShowLayout>
</Labeled>
Expand Down

0 comments on commit d377af8

Please sign in to comment.