Skip to content

Commit 9ed1f48

Browse files
committed
Fixes a bug in the previous commit
1 parent 66c3116 commit 9ed1f48

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

src/shared/containers/tc-communities/Loader.jsx

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -65,8 +65,9 @@ class Loader extends React.Component {
6565
return <LoadingPagePlaceholder />;
6666
}
6767

68-
const visitorGroupIds = visitorGroups.map(g => g.id);
69-
const member = meta.groupId && visitorGroupIds.includes(meta.groupId);
68+
const visitorGroupIds = visitorGroups ? visitorGroups.map(g => g.id) : null;
69+
const member = visitorGroupIds && meta.groupId
70+
&& visitorGroupIds.includes(meta.groupId);
7071

7172
/* Community does not require authorization. */
7273
if (!meta.authorizedGroupIds) return Community({ member, meta });

0 commit comments

Comments
 (0)