From 527c5ec7dde82f5313fcad729a73e7304074394b Mon Sep 17 00:00:00 2001 From: David Tsay <3614296+davetsay@users.noreply.github.com> Date: Wed, 6 Nov 2019 15:14:05 -0800 Subject: [PATCH] src/selection/Selection.js (#2535) --- src/selection/Selection.js | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/selection/Selection.js b/src/selection/Selection.js index f94adc388a..66d08b8744 100644 --- a/src/selection/Selection.js +++ b/src/selection/Selection.js @@ -218,15 +218,15 @@ define( * @public */ Selection.prototype.selectable = function (element, context, select) { + if (!this.isSelectable(element)) { + return () => {}; + } + let selectable = { context: context, element: element }; - if (!this.isSelectable(element)) { - return () => {}; - } - var capture = this.capture.bind(this, selectable); var selectCapture = this.selectCapture.bind(this, selectable);