diff --git a/server/src/components/time-management/AddWorkItemDialog.tsx b/server/src/components/time-management/AddWorkItemDialog.tsx index dcd2a4b9..01f50d6b 100644 --- a/server/src/components/time-management/AddWorkItemDialog.tsx +++ b/server/src/components/time-management/AddWorkItemDialog.tsx @@ -11,8 +11,10 @@ interface AddWorkItemDialogProps { } export function AddWorkItemDialog({ isOpen, onClose, onAdd, existingWorkItems }: AddWorkItemDialogProps) { - const handleSelect = (workItem: IWorkItem) => { - onAdd(workItem); + const handleSelect = (workItem: IWorkItem | null) => { + if (workItem) { + onAdd(workItem); + } }; return (