profile comment page crash fix

This commit is contained in:
BFlat committed 2024-01-24 22:53:44 +07:00
1 parent 0b95de8e7a
commit 4760db4460
1 file changed
+1 -1
@@ -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 = <></>;