diff --git a/frontend/src/components/RSVPForm.tsx b/frontend/src/components/RSVPForm.tsx index 5a47fe9..a827185 100644 --- a/frontend/src/components/RSVPForm.tsx +++ b/frontend/src/components/RSVPForm.tsx @@ -73,10 +73,11 @@ const RSVPForm: React.FC = () => { }; const handleItemsChange = (e: SelectChangeEvent) => { - const { value } = e.target; + const value = e.target.value; + const itemsArray = Array.isArray(value) ? value : typeof value === 'string' ? [value] : []; setFormData(prev => ({ ...prev, - items_bringing: Array.isArray(value) ? value : typeof value === 'string' ? value.split(',') : [], + items_bringing: itemsArray })); }; @@ -203,16 +204,15 @@ const RSVPForm: React.FC = () => {