From c72fff6bb601f16f891c796c3db0caf875457328 Mon Sep 17 00:00:00 2001 From: Carlos Valente Date: Tue, 17 Jun 2025 21:04:51 +0200 Subject: [PATCH] refactor: check for no custom project fields --- apps/client/src/views/project-info/ProjectInfo.tsx | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/apps/client/src/views/project-info/ProjectInfo.tsx b/apps/client/src/views/project-info/ProjectInfo.tsx index dd11374a0..5ece8f0be 100644 --- a/apps/client/src/views/project-info/ProjectInfo.tsx +++ b/apps/client/src/views/project-info/ProjectInfo.tsx @@ -37,7 +37,13 @@ export default function ProjectInfo(props: ProjectInfoProps) { ); } - const isEmpty = Object.values(general).every((value) => !value); + /** + * Check if there is data to show at all + * We need a special check for the project fields which can be an empty array + */ + const isEmpty = Object.values(general).every( + (value) => !value || (value && Array.isArray(value) && value.length === 0), + ); if (isEmpty) { return ( <>