From a87cb40993c9321c1faf6adf0c0f90ed017659a9 Mon Sep 17 00:00:00 2001
From: Joram Wilander <jwawilander@gmail.com>
Date: Mon, 6 Mar 2017 16:06:16 -0500
Subject: Fix JS error in mobile view when opening add member modal from view
 member modal (#5661)

---
 webapp/components/navbar.jsx | 2 ++
 1 file changed, 2 insertions(+)

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

diff --git a/webapp/components/navbar.jsx b/webapp/components/navbar.jsx
index dee32416b..c945a0b9c 100644
--- a/webapp/components/navbar.jsx
+++ b/webapp/components/navbar.jsx
@@ -339,6 +339,7 @@ export default class Navbar extends React.Component {
                     addMembersOption = (
                         <li role='presentation'>
                             <ToggleModalButton
+                                ref='channelInviteModalButton'
                                 role='menuitem'
                                 dialogType={ChannelInviteModal}
                                 dialogProps={{channel, currentUser: this.state.currentUser}}
@@ -796,6 +797,7 @@ export default class Navbar extends React.Component {
                     <ChannelMembersModal
                         show={true}
                         onModalDismissed={this.hideMembersModal}
+                        showInviteModal={() => this.refs.channelInviteModalButton.show()}
                         channel={channel}
                         isAdmin={isAdmin}
                     />
-- 
cgit v1.2.3-1-g7c22

