diff --git a/src/shared/components/challenge-detail/Header/TabSelector/index.jsx b/src/shared/components/challenge-detail/Header/TabSelector/index.jsx
index 4a3c73e159..eb95429a9d 100644
--- a/src/shared/components/challenge-detail/Header/TabSelector/index.jsx
+++ b/src/shared/components/challenge-detail/Header/TabSelector/index.jsx
@@ -176,30 +176,35 @@ export default function ChallengeViewSelector(props) {
) : null
}
- { (hasRegistered || Boolean(roles.length))
- && _.isEmpty(discuss)
- ? (
-
- CHALLENGE FORUM
-
- ) : (
- discuss.map(d => (
-
- CHALLENGE DISCUSSION
-
- ))
- )
- }
+ { (() => {
+ if (hasRegistered || Boolean(roles.length)) {
+ if (_.isEmpty(discuss)) {
+ return (
+
+ CHALLENGE FORUM
+
+ );
+ }
+ return (
+ discuss.map(d => (
+
+ CHALLENGE DISCUSSION
+
+ ))
+ );
+ }
+ return '';
+ })()}
);