Skip to content

Commit 1f8c895

Browse files
committed
Add optional chaining operator for sampled_portions
1 parent bf28f6d commit 1f8c895

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

web/src/components/DataObjectTable.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -122,7 +122,7 @@ export default defineComponent({
122122
if (annotations.eluent_introduction_category) {
123123
omicsCopy.eluentIntroductionCategory = EluentIntroductionCategoryEnum.permissible_values[annotations.eluent_introduction_category].title;
124124
}
125-
if (annotations.sampled_portions.length) {
125+
if (annotations.sampled_portions?.length) {
126126
const displaySampledPortions = (annotations.sampled_portions as string[]).map((sampledPortion: string) => (
127127
SamplePortionEnum.permissible_values[sampledPortion].title
128128
|| SamplePortionEnum.permissible_values[sampledPortion].text

0 commit comments

Comments
 (0)