From 9e306d57fef5ecf1a68891fd9acec4c5b3cedc80 Mon Sep 17 00:00:00 2001 From: Lucy Jemutai Date: Fri, 29 Nov 2024 09:17:11 +0300 Subject: [PATCH 1/2] ensure we display 0 and not NaN --- pages/orgs/[org]/domains/index.js | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/pages/orgs/[org]/domains/index.js b/pages/orgs/[org]/domains/index.js index b69d460..78a3078 100755 --- a/pages/orgs/[org]/domains/index.js +++ b/pages/orgs/[org]/domains/index.js @@ -84,7 +84,17 @@ function OrgDomainsList() { Mappings: {new Intl.NumberFormat().format(domain.sources_data[0]?.summary?.active_mappings) || 0} */} - Concepts: {new Intl.NumberFormat().format(domain.sources_data[0]?.summary?.active_concepts) || 0} + Concepts: + {Number.isFinite( + domain.sources_data[0]?.summary + ?.active_concepts + ) + ? new Intl.NumberFormat().format( + domain.sources_data[0]?.summary + ?.active_concepts + ) + : 0} :   From 85912565ae8e5eaee69bd3e650eaca1f19610437 Mon Sep 17 00:00:00 2001 From: Lucy Jemutai Date: Fri, 29 Nov 2024 10:34:22 +0300 Subject: [PATCH 2/2] fix indentation --- pages/orgs/[org]/domains/index.js | 19 ++++++++----------- 1 file changed, 8 insertions(+), 11 deletions(-) diff --git a/pages/orgs/[org]/domains/index.js b/pages/orgs/[org]/domains/index.js index 78a3078..16a8059 100755 --- a/pages/orgs/[org]/domains/index.js +++ b/pages/orgs/[org]/domains/index.js @@ -84,17 +84,14 @@ function OrgDomainsList() { Mappings: {new Intl.NumberFormat().format(domain.sources_data[0]?.summary?.active_mappings) || 0} */} - Concepts: - {Number.isFinite( - domain.sources_data[0]?.summary - ?.active_concepts - ) - ? new Intl.NumberFormat().format( - domain.sources_data[0]?.summary - ?.active_concepts - ) - : 0} + Concepts: + + {Number.isFinite(domain.sources_data[0]?.summary?.active_concepts) + ? new Intl.NumberFormat().format( + domain.sources_data[0]?.summary?.active_concepts + ) + : 0} + :