Skip to content

Commit 6fcd7f8

Browse files
committed
Add optional chaining to country and dtype in appeals table
1 parent 7dd2697 commit 6fcd7f8

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/components/domain/AppealsTable/index.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -125,7 +125,7 @@ function AppealsTable(props: Props) {
125125
createStringColumn<AppealListItem, string>(
126126
'dtype',
127127
strings.appealsTableDisastertype,
128-
(item) => item.dtype.name,
128+
(item) => item.dtype?.name,
129129
{ sortable: true },
130130
),
131131
createNumberColumn<AppealListItem, string>(
@@ -152,7 +152,7 @@ function AppealsTable(props: Props) {
152152
createLinkColumn<AppealListItem, string>(
153153
'country',
154154
strings.appealsTableCountry,
155-
(item) => item.country.name,
155+
(item) => item.country?.name,
156156
(item) => ({
157157
to: 'countriesLayout',
158158
urlParams: { countryId: item.country.id },

0 commit comments

Comments
 (0)