Skip to content

Commit

Permalink
Add optional chaining to country and dtype in appeals table
Browse files Browse the repository at this point in the history
  • Loading branch information
frozenhelium committed Dec 14, 2023
1 parent 7dd2697 commit 6fcd7f8
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/components/domain/AppealsTable/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,7 @@ function AppealsTable(props: Props) {
createStringColumn<AppealListItem, string>(
'dtype',
strings.appealsTableDisastertype,
(item) => item.dtype.name,
(item) => item.dtype?.name,
{ sortable: true },
),
createNumberColumn<AppealListItem, string>(
Expand All @@ -152,7 +152,7 @@ function AppealsTable(props: Props) {
createLinkColumn<AppealListItem, string>(
'country',
strings.appealsTableCountry,
(item) => item.country.name,
(item) => item.country?.name,
(item) => ({
to: 'countriesLayout',
urlParams: { countryId: item.country.id },
Expand Down

0 comments on commit 6fcd7f8

Please sign in to comment.