From 1afdb0e3c053dd45dd25fe8742c44449c2552269 Mon Sep 17 00:00:00 2001 From: Michael Telatynski <7t3chguy@gmail.com> Date: Sat, 16 Jun 2018 08:44:57 +0100 Subject: [PATCH] add null-guard Signed-off-by: Michael Telatynski <7t3chguy@gmail.com> --- src/components/structures/LeftPanel.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/components/structures/LeftPanel.js b/src/components/structures/LeftPanel.js index 416012c5f1..7517103d88 100644 --- a/src/components/structures/LeftPanel.js +++ b/src/components/structures/LeftPanel.js @@ -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; }