File tree Expand file tree Collapse file tree
src/components/SearchPage Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -76,18 +76,25 @@ const DatasetCard: React.FC<DatasetCardProps> = ({
7676 < Typography variant = "body2" mt = { 1 } >
7777 < strong > Modalities:</ strong >
7878 </ Typography >
79- { modality ?. map ( ( mod , idx ) => (
80- < Chip
81- key = { idx }
82- label = { mod }
83- variant = "outlined"
84- sx = { {
85- color : Colors . darkPurple ,
86- border : `1px solid ${ Colors . darkPurple } ` ,
87- fontWeight : "bold" ,
88- } }
89- />
90- ) ) }
79+
80+ { Array . isArray ( modality ) && modality . length > 0 ? (
81+ modality . map ( ( mod , idx ) => (
82+ < Chip
83+ key = { idx }
84+ label = { mod }
85+ variant = "outlined"
86+ sx = { {
87+ color : Colors . darkPurple ,
88+ border : `1px solid ${ Colors . darkPurple } ` ,
89+ fontWeight : "bold" ,
90+ } }
91+ />
92+ ) )
93+ ) : (
94+ < Typography variant = "body2" mt = { 1 } >
95+ N/A
96+ </ Typography >
97+ ) }
9198 </ Stack >
9299
93100 < Stack direction = "row" spacing = { 1 } flexWrap = "wrap" gap = { 1 } >
You can’t perform that action at this time.
0 commit comments