diff --git a/src/components/Problems/Discussion.tsx b/src/components/Problems/Discussion.tsx index e2857d0ad..3ee05298 100644 --- a/src/components/Problems/Discussion.tsx +++ b/src/components/Problems/Discussion.tsx @@ -96,7 +96,7 @@ export const Discussion: FC = ({problemId, problemNumber, close const close = () => setDeleteDialogId(undefined) const agree = () => { - deleteDialogId !== undefined ? confirmDeleteComment(deleteDialogId) : undefined + if (deleteDialogId !== undefined) confirmDeleteComment(deleteDialogId) close() }