summaryrefslogtreecommitdiffstats
path: root/webapp/components/navbar.jsx
diff options
context:
space:
mode:
Diffstat (limited to 'webapp/components/navbar.jsx')
-rw-r--r--webapp/components/navbar.jsx32
1 files changed, 15 insertions, 17 deletions
diff --git a/webapp/components/navbar.jsx b/webapp/components/navbar.jsx
index b27e22709..fa759cae7 100644
--- a/webapp/components/navbar.jsx
+++ b/webapp/components/navbar.jsx
@@ -529,23 +529,21 @@ export default class Navbar extends React.Component {
);
}
- if (ChannelUtils.showDeleteOption(channel, isAdmin, isSystemAdmin, isChannelAdmin) || this.state.userCount === 1) {
- if (!ChannelStore.isDefault(channel)) {
- deleteChannelOption = (
- <li role='presentation'>
- <ToggleModalButton
- role='menuitem'
- dialogType={DeleteChannelModal}
- dialogProps={{channel}}
- >
- <FormattedMessage
- id='channel_header.delete'
- defaultMessage='Delete Channel'
- />
- </ToggleModalButton>
- </li>
- );
- }
+ if (ChannelUtils.showDeleteOption(channel, isAdmin, isSystemAdmin, isChannelAdmin, this.state.userCount)) {
+ deleteChannelOption = (
+ <li role='presentation'>
+ <ToggleModalButton
+ role='menuitem'
+ dialogType={DeleteChannelModal}
+ dialogProps={{channel}}
+ >
+ <FormattedMessage
+ id='channel_header.delete'
+ defaultMessage='Delete Channel'
+ />
+ </ToggleModalButton>
+ </li>
+ );
}
const canLeave = channel.type === Constants.PRIVATE_CHANNEL ? this.state.userCount > 1 : true;