diff --git a/frontend/src/components/EventAdmin.tsx b/frontend/src/components/EventAdmin.tsx index a7e14de..249e1e5 100644 --- a/frontend/src/components/EventAdmin.tsx +++ b/frontend/src/components/EventAdmin.tsx @@ -772,7 +772,7 @@ const EventAdmin: React.FC = () => { .map(r => r.other_items) .filter(Boolean) .flat() - .filter((item: string) => item && item.trim() !== ''); + .filter((item): item is string => typeof item === 'string' && item.trim() !== ''); return allOtherItems.length > 0 ? allOtherItems.join(', ') : 'No other items have been brought'; diff --git a/frontend/src/components/EventView.tsx b/frontend/src/components/EventView.tsx index 204b714..a607768 100644 --- a/frontend/src/components/EventView.tsx +++ b/frontend/src/components/EventView.tsx @@ -249,7 +249,7 @@ const EventView: React.FC = () => { .map(r => r.other_items) .filter(Boolean) .flat() - .filter((item: string) => item && item.trim() !== ''); + .filter((item): item is string => typeof item === 'string' && item.trim() !== ''); return allOtherItems.length > 0 ? allOtherItems.join(', ') : 'No other items have been brought';