add null-guard

Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
pull/21833/head
Michael Telatynski 2018-06-16 08:44:57 +01:00
parent 8971211639
commit 1afdb0e3c0
No known key found for this signature in database
GPG Key ID: 3F879DA5AD802A5E
1 changed files with 3 additions and 1 deletions

View File

@ -95,7 +95,9 @@ var LeftPanel = React.createClass({
break;
case KeyCode.ENTER:
this._onMoveFocus(false);
this.focusedElement.click();
if (this.focusedElement) {
this.focusedElement.click();
}
handled = true;
break;
}