From 2a6bf2d138847aa594ea563dff2668b95cf533f7 Mon Sep 17 00:00:00 2001 From: Jake Iwen Date: Thu, 9 Jul 2020 15:57:03 -0500 Subject: [PATCH] patch focusEditor() validation --- lib/atom-ternjs-helper.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/atom-ternjs-helper.js b/lib/atom-ternjs-helper.js index d6bb662..e630a11 100644 --- a/lib/atom-ternjs-helper.js +++ b/lib/atom-ternjs-helper.js @@ -42,9 +42,9 @@ export function isValidEditor(editor) { export function focusEditor() { - const editor = atom.workspace.getActiveTextEditor(); + const editor = atom.workspace.getActivePaneItem(); - if (!editor) { + if (!isValidEditor(editor)) { return; }