summaryrefslogtreecommitdiffstats
path: root/web
diff options
context:
space:
mode:
Diffstat (limited to 'web')
-rw-r--r--web/react/components/channel_header.jsx16
1 files changed, 9 insertions, 7 deletions
diff --git a/web/react/components/channel_header.jsx b/web/react/components/channel_header.jsx
index cd1fb225a..48cb4d13b 100644
--- a/web/react/components/channel_header.jsx
+++ b/web/react/components/channel_header.jsx
@@ -46,13 +46,15 @@ var ExtraMembers = React.createClass({
var data_content = "";
var sortedMembers = this.props.members;
- sortedMembers.sort(function(a,b) {
- return a.username.localeCompare(b.username);
- })
-
- sortedMembers.forEach(function(m) {
- data_content += "<div style='white-space: nowrap'>" + m.username + "</div>";
- });
+ if(sortedMembers) {
+ sortedMembers.sort(function(a,b) {
+ return a.username.localeCompare(b.username);
+ })
+
+ sortedMembers.forEach(function(m) {
+ data_content += "<div style='white-space: nowrap'>" + m.username + "</div>";
+ });
+ }
return (
<div style={{"cursor" : "pointer"}} id="member_popover" data-toggle="popover" data-content={data_content} data-original-title="Members" >