From 28f58249372806ba6ec8c77deb630714ba305fad Mon Sep 17 00:00:00 2001 From: Artur Arseniev Date: Thu, 21 Dec 2017 22:37:32 +0100 Subject: [PATCH] Update SelectParent --- src/commands/view/SelectParent.js | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/commands/view/SelectParent.js b/src/commands/view/SelectParent.js index 6b5ad8461..a40c3ee8f 100644 --- a/src/commands/view/SelectParent.js +++ b/src/commands/view/SelectParent.js @@ -1,9 +1,10 @@ module.exports = { run(editor) { - var comp = editor.getSelected() && editor.getSelected().parent(); + const sel = editor.getSelected(); + let comp = sel && sel.parent(); - // recurse through the parent() chain until a selectable parent is found + // Recurse through the parent() chain until a selectable parent is found while (comp && !comp.get("selectable")) { comp = comp.parent(); }