From 2c0c71d460e749e1cd0c905a663349c3af94bdeb Mon Sep 17 00:00:00 2001
From: George Goldberg <george@gberg.me>
Date: Fri, 24 Mar 2017 20:42:37 +0000
Subject: PLT-5910: Fix Channel header menu in Town Square. (#5831)

---
 webapp/components/channel_header.jsx | 42 ++++++++++++++++++------------------
 1 file changed, 21 insertions(+), 21 deletions(-)

(limited to 'webapp/components/channel_header.jsx')

diff --git a/webapp/components/channel_header.jsx b/webapp/components/channel_header.jsx
index c05033b51..6ce56ab4e 100644
--- a/webapp/components/channel_header.jsx
+++ b/webapp/components/channel_header.jsx
@@ -499,14 +499,14 @@ export default class ChannelHeader extends React.Component {
                 </li>
             );
 
-            dropdownContents.push(
-                <li
-                    key='divider-1'
-                    className='divider'
-                />
-            );
-
             if (!ChannelStore.isDefault(channel)) {
+                dropdownContents.push(
+                    <li
+                        key='divider-1'
+                        className='divider'
+                    />
+                );
+
                 dropdownContents.push(
                     <li
                         id='channelAddMembers'
@@ -547,13 +547,6 @@ export default class ChannelHeader extends React.Component {
                 );
             }
 
-            dropdownContents.push(
-                <li
-                    key='divider-2'
-                    className='divider'
-                />
-            );
-
             const deleteOption = (
                 <li
                     id='channelDelete'
@@ -577,6 +570,13 @@ export default class ChannelHeader extends React.Component {
             );
 
             if (ChannelUtils.showManagementOptions(channel, isAdmin, isSystemAdmin, isChannelAdmin)) {
+                dropdownContents.push(
+                    <li
+                        key='divider-2'
+                        className='divider'
+                    />
+                );
+
                 dropdownContents.push(
                     <li
                         id='channelEditHeader'
@@ -652,15 +652,15 @@ export default class ChannelHeader extends React.Component {
                 dropdownContents.push(deleteOption);
             }
 
-            dropdownContents.push(
-                <li
-                    key='divider-3'
-                    className='divider'
-                />
-            );
-
             const canLeave = channel.type === Constants.PRIVATE_CHANNEL ? this.state.userCount > 1 : true;
             if (!ChannelStore.isDefault(channel) && canLeave) {
+                dropdownContents.push(
+                    <li
+                        key='divider-3'
+                        className='divider'
+                    />
+                );
+
                 dropdownContents.push(
                     <li
                         id='channelLeave'
-- 
cgit v1.2.3-1-g7c22

