From e8698b6f7b47ccfcb2bac3fbf45492972a721c89 Mon Sep 17 00:00:00 2001 From: Alexandre Bodin Date: Tue, 23 Apr 2024 14:40:14 +0200 Subject: [PATCH] fix: content could be undefined --- .../pages/ListView/components/TableCells/CellContent.tsx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/core/admin/admin/src/content-manager/pages/ListView/components/TableCells/CellContent.tsx b/packages/core/admin/admin/src/content-manager/pages/ListView/components/TableCells/CellContent.tsx index 63f106a75a..6b911952a8 100644 --- a/packages/core/admin/admin/src/content-manager/pages/ListView/components/TableCells/CellContent.tsx +++ b/packages/core/admin/admin/src/content-manager/pages/ListView/components/TableCells/CellContent.tsx @@ -95,7 +95,7 @@ const hasContent = ( // Repeatable fields show the ID as fallback, in case the mainField // doesn't have any content if (fieldSchema?.repeatable || !mainField) { - return content.length > 0; + return content && Array.isArray(content) && content.length > 0; } const value = content?.[mainField.name]; @@ -130,7 +130,7 @@ const hasContent = ( return content?.count > 0; } - /* + /* Biginteger fields need to be treated as strings, as `isNumber` doesn't deal with them. */