Skip to content

Commit 3448b1b

Browse files
committed
add optional chaining operator
1 parent 12cb2d0 commit 3448b1b

File tree

2 files changed

+2
-2
lines changed
  • app/[locale]/(user)

2 files changed

+2
-2
lines changed

app/[locale]/(user)/datasets/[datasetIdentifier]/components/SimilarDatasets/index.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -149,7 +149,7 @@ const SimilarDatasets: React.FC<Props> = ({ showCharts }) => {
149149
formats={item.formats}
150150
footerContent={[
151151
{
152-
icon: `/Sectors/${item.sectors[0].name}.svg`,
152+
icon: `/Sectors/${item.sectors[0]?.name}.svg`,
153153
label: 'Sectors',
154154
},
155155
{

app/[locale]/(user)/publishers/components/Datasets.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -174,7 +174,7 @@ const Datasets = ({ type }: { type: 'organization' | 'Publisher' }) => {
174174
formats={item.formats}
175175
footerContent={[
176176
{
177-
icon: `/Sectors/${item.sectors[0].name}.svg`,
177+
icon: `/Sectors/${item.sectors[0]?.name}.svg`,
178178
label: 'Sectors',
179179
},
180180
{

0 commit comments

Comments
 (0)