Skip to content

Commit

Permalink
Merge pull request #787 from yuya-oc/fix-add-server-error
Browse files Browse the repository at this point in the history
Fix an error where the main page gets blank when adding a server
  • Loading branch information
yuya-oc authored May 4, 2018
2 parents 5b89bff + 2df19c4 commit 59e2e7e
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/browser/components/MattermostView.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -227,9 +227,10 @@ const MattermostView = createReactClass({

focusOnWebView() {
const webview = findDOMNode(this.refs.webview);
if (!webview.getWebContents().isFocused()) {
const webContents = webview.getWebContents(); // webContents might not be created yet.
if (webContents && webContents.isFocused()) {
webview.focus();
webview.getWebContents().focus();
webContents.focus();
}
},

Expand Down

0 comments on commit 59e2e7e

Please sign in to comment.