Skip to content

Commit

Permalink
Merge pull request #589 from onursumer/fix-plots-tab
Browse files Browse the repository at this point in the history
Fix broken Plots tab
  • Loading branch information
onursumer authored Feb 23, 2024
2 parents f211211 + 74a78f7 commit 51f22cb
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
10 changes: 5 additions & 5 deletions packages/data-portal-commons/src/lib/entityReportHelpers.ts
Original file line number Diff line number Diff line change
Expand Up @@ -117,11 +117,11 @@ export function computeEntityReportByAttribute(
}

export function getNormalizedOrgan(entity: Entity) {
return (
tissueOrOriginToOrganMap[
normalizeTissueOrOrganOrSite(entity.TissueorOrganofOrigin)
] || entity.TissueorOrganofOrigin
);
return entity.TissueorOrganofOrigin
? tissueOrOriginToOrganMap[
normalizeTissueOrOrganOrSite(entity.TissueorOrganofOrigin)
] || entity.TissueorOrganofOrigin
: entity.TissueorOrganofOrigin;
}

export function getNormalizedAssay(entity: Entity) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ function normalizeUnknownValues(
) {
const val = accessor ? accessor(entity) || '' : '';

if (/^unknown|not reported|^NA/i.test(val.toString())) {
if (val === '' || /^unknown|not reported|^NA/i.test(val.toString())) {
return 'NA';
} else {
return val;
Expand Down

0 comments on commit 51f22cb

Please sign in to comment.