From 02e188dfa21c9941c3f9317b36e5aa5de680ef39 Mon Sep 17 00:00:00 2001 From: Agent Zero Date: Thu, 30 Jul 2026 09:35:32 +0200 Subject: [PATCH] fix: customFieldDefs.items optional chaining to prevent crash on empty response --- frontend/src/pages/ContactsList.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/frontend/src/pages/ContactsList.tsx b/frontend/src/pages/ContactsList.tsx index 423f159..a9719e1 100644 --- a/frontend/src/pages/ContactsList.tsx +++ b/frontend/src/pages/ContactsList.tsx @@ -79,7 +79,7 @@ export function ContactsListPage() { // Build custom field defs for filter/sort/group functions const customDefsForFunctions = useMemo(() => { - if (!customFieldDefs || customFieldDefs.items.length === 0) return undefined; + if (!customFieldDefs || !customFieldDefs.items || customFieldDefs.items.length === 0) return undefined; return customFieldDefs.items .filter((def) => def.is_active) .map((def) => ({