diff --git a/apps/web/components/pages/team/tasks/DropdownMenuTask.tsx b/apps/web/components/pages/team/tasks/DropdownMenuTask.tsx index d11aa2939..3bc4dfc42 100644 --- a/apps/web/components/pages/team/tasks/DropdownMenuTask.tsx +++ b/apps/web/components/pages/team/tasks/DropdownMenuTask.tsx @@ -25,11 +25,12 @@ const DropdownMenuTask: FC<{ task: ITeamTask }> = ({ task }) => { const t = useTranslations(); const handleAssignment = useCallback(() => { - if (!memberInfo) return; - if (memberInfo.member?.employee?.user?.id === user?.id) { - memberInfo.unassignTask(task); - } else { - memberInfo.assignTask(task); + if (memberInfo) { + if (memberInfo.member?.employee?.user?.id === user?.id) { + memberInfo.unassignTask(task); + } else { + memberInfo.assignTask(task); + } } }, [memberInfo, task]);