diff --git a/src/webcomponents/commons/catalog-grid-formatter.js b/src/webcomponents/commons/catalog-grid-formatter.js index 019df3577..da25b29c3 100644 --- a/src/webcomponents/commons/catalog-grid-formatter.js +++ b/src/webcomponents/commons/catalog-grid-formatter.js @@ -30,7 +30,7 @@ export default class CatalogGridFormatter { `; } static sexFormatter(value, row) { - let sexHtml = `${UtilsNew.isEmpty(row?.sex) ? "Not specified" : row.sex.id || row.sex}`; + let sexHtml = `${UtilsNew.isEmpty(value) ? "Not specified" : value.id ?? value}`; if (row?.karyotypicSex && row.karyotypicSex !== "UNKNOWN") { sexHtml += ` (${row.karyotypicSex?.id || row.karyotypicSex})`; } diff --git a/src/webcomponents/variant/annotation/cellbase-variant-annotation-summary.js b/src/webcomponents/variant/annotation/cellbase-variant-annotation-summary.js index 7f8ab6303..aa6a27e3f 100644 --- a/src/webcomponents/variant/annotation/cellbase-variant-annotation-summary.js +++ b/src/webcomponents/variant/annotation/cellbase-variant-annotation-summary.js @@ -216,7 +216,7 @@ export default class CellbaseVariantAnnotationSummary extends LitElement { title: "HGVS", type: "custom", display: { - visible: data => data?.hgvs.length > 0, + visible: data => data?.hgvs?.length > 0, render: data => { return data.hgvs.map(item => html`${item}
`); }, diff --git a/src/webcomponents/variant/variant-samples.js b/src/webcomponents/variant/variant-samples.js index 256018c5f..d3c5f5bd8 100644 --- a/src/webcomponents/variant/variant-samples.js +++ b/src/webcomponents/variant/variant-samples.js @@ -335,7 +335,7 @@ export default class VariantSamples extends LitElement { field: "attributes.OPENCGA_INDIVIDUAL", colspan: 1, rowspan: 1, - formatter: (attributesIndividual, sample) => CatalogGridFormatter.sexFormatter(attributesIndividual.sex, attributesIndividual), + formatter: attributesIndividual => CatalogGridFormatter.sexFormatter(attributesIndividual?.sex, attributesIndividual), halign: "center" }, {