From 4760db4460227de36280800b49052be63ab03fe0 Mon Sep 17 00:00:00 2001 From: BFlat Date: Wed, 24 Jan 2024 22:53:44 +0700 Subject: [PATCH] profile comment page crash fix --- .../fakeyou.com/src/v2/view/_common/comments/CommentList.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/fakeyou.com/src/v2/view/_common/comments/CommentList.tsx b/packages/fakeyou.com/src/v2/view/_common/comments/CommentList.tsx index 60974cc837..dde414003b 100644 --- a/packages/fakeyou.com/src/v2/view/_common/comments/CommentList.tsx +++ b/packages/fakeyou.com/src/v2/view/_common/comments/CommentList.tsx @@ -40,7 +40,7 @@ function CommentList(props: Props) { // We want profile / model / result owner to be able to clear harassing // comments themselves. This isn't ready yet, though. const isAuthor = userTokenMatch(comment.user_token); - const isModerator = user.canBanUsers; + const isModerator = user?.canBanUsers; const canDelete = isAuthor || isModerator; let maybeDeleteButton = <>;