From fc02199f194ed68fdec671777b5a38ef35a45dfe Mon Sep 17 00:00:00 2001 From: Elias Nahum Date: Mon, 10 Dec 2018 10:55:01 -0300 Subject: [PATCH] MM-13419 Fix leaving private channel from another client (#2442) --- app/components/post_textbox/index.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/components/post_textbox/index.js b/app/components/post_textbox/index.js index 303bedb56..3f0e55605 100644 --- a/app/components/post_textbox/index.js +++ b/app/components/post_textbox/index.js @@ -45,10 +45,10 @@ function mapStateToProps(state, ownProps) { return { channelId: ownProps.channelId || (currentChannel ? currentChannel.id : ''), - channelTeamId: currentChannel.team_id, + channelTeamId: currentChannel ? currentChannel.team_id : '', canUploadFiles: canUploadFilesOnMobile(state), channelIsLoading: state.views.channel.loading, - channelIsReadOnly: isCurrentChannelReadOnly(state), + channelIsReadOnly: isCurrentChannelReadOnly(state) || false, channelIsArchived: ownProps.channelIsArchived || (currentChannel ? currentChannel.delete_at !== 0 : false), currentUserId, userIsOutOfOffice,