From 4cc6493d654f24be26f35312d707031b077cf4b2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Richard=20Trembeck=C3=BD?= Date: Sat, 11 Nov 2023 14:22:58 +0100 Subject: [PATCH] Discussion - agree function readability (#171) --- src/components/Problems/Discussion.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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() }