diff --git a/src/browser/components/MainPage.jsx b/src/browser/components/MainPage.jsx index 56298606..df9ee483 100644 --- a/src/browser/components/MainPage.jsx +++ b/src/browser/components/MainPage.jsx @@ -347,8 +347,8 @@ export default class MainPage extends React.Component { } focusListener = () => { - if (this.state.showNewTeamModal && this.inputRef) { - this.inputRef.current().focus(); + if (this.state.showNewTeamModal && this.inputRef && this.inputRef.current) { + this.inputRef.current.focus(); } else if (!(this.state.finderVisible && this.state.focusFinder)) { this.handleOnTeamFocused(this.state.key); this.refs[`mattermostView${this.state.key}`].focusOnWebView();