From f529d29a771a71f503ade367b2368260f150c313 Mon Sep 17 00:00:00 2001 From: btzr-io Date: Sun, 15 Oct 2017 16:28:06 -0600 Subject: [PATCH] minor cleanup for channelSection --- .../publishForm/internal/channelSection.jsx | 14 +++++--------- 1 file changed, 5 insertions(+), 9 deletions(-) diff --git a/ui/js/component/publishForm/internal/channelSection.jsx b/ui/js/component/publishForm/internal/channelSection.jsx index d4ce1ed14..d61ae3762 100644 --- a/ui/js/component/publishForm/internal/channelSection.jsx +++ b/ui/js/component/publishForm/internal/channelSection.jsx @@ -89,8 +89,7 @@ class ChannelSection extends React.PureComponent { const channel = this.state.addingChannel ? "new" : this.props.channel; const { fetchingChannels, channels = [] } = this.props; - let channelContent = []; - channelContent.push( + const channelSelector = ( {__("Anonymous")} - {this.props.channels.map(({ name }) => + {channels.map(({ name }) => )} ); - if (fetchingChannels) { - channelContent = ( - - ); - } return (
@@ -128,7 +122,9 @@ class ChannelSection extends React.PureComponent {
- {channelContent} + {fetchingChannels + ? + : channelSelector}
{this.state.addingChannel &&