diff --git a/packages/data-portal-commons/src/lib/entityReportHelpers.ts b/packages/data-portal-commons/src/lib/entityReportHelpers.ts index 53dbffd4..3311b863 100644 --- a/packages/data-portal-commons/src/lib/entityReportHelpers.ts +++ b/packages/data-portal-commons/src/lib/entityReportHelpers.ts @@ -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) { diff --git a/packages/data-portal-explore/src/components/ExplorePlot.tsx b/packages/data-portal-explore/src/components/ExplorePlot.tsx index bb2c53c3..d4131fb1 100644 --- a/packages/data-portal-explore/src/components/ExplorePlot.tsx +++ b/packages/data-portal-explore/src/components/ExplorePlot.tsx @@ -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;