From 5019728bfec52e224d22ff4cad27de97406dde56 Mon Sep 17 00:00:00 2001 From: Ada Rose Cannon Date: Tue, 12 Jul 2022 14:06:49 +0100 Subject: [PATCH] data in wrong place --- src/components/cursor.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/components/cursor.js b/src/components/cursor.js index 1684f9887d7..8472ce2d3a3 100644 --- a/src/components/cursor.js +++ b/src/components/cursor.js @@ -320,6 +320,8 @@ module.exports.Component = registerComponent('cursor', { * in case user mousedowned one entity, dragged to another, and mouseupped. */ onCursorUp: function (evt) { + var data = this.data; + if (!this.isCursorDown) { return; } // If there is no activeInput being pressed or it is not @@ -330,8 +332,6 @@ module.exports.Component = registerComponent('cursor', { ) { return; } this.isCursorDown = false; - - var data = this.data; this.twoWayEmit(EVENTS.MOUSEUP); if (this.reenableARHitTest === true) {