Skip to content

Commit

Permalink
Merge pull request #1000 from opencb/TASK-6629
Browse files Browse the repository at this point in the history
TASK-6629 - Issues in the Summary and Samples tabs of Variant Browser
  • Loading branch information
jmjuanes authored Nov 8, 2024
2 parents 13a3c11 + a7143d8 commit 3129785
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/webcomponents/commons/catalog-grid-formatter.js
Original file line number Diff line number Diff line change
Expand Up @@ -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})`;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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}<br>`);
},
Expand Down
2 changes: 1 addition & 1 deletion src/webcomponents/variant/variant-samples.js
Original file line number Diff line number Diff line change
Expand Up @@ -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"
},
{
Expand Down

0 comments on commit 3129785

Please sign in to comment.