From b74ad31acedf1a9955fd9134e6626c465f936725 Mon Sep 17 00:00:00 2001
From: joni <johnfshaughnessy@gmail.com>
Date: Tue, 5 Jun 2018 17:36:06 -0700
Subject: [PATCH] Don't call setAttribute twice.

---
 src/components/cursor-controller.js | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/components/cursor-controller.js b/src/components/cursor-controller.js
index 1c3997b72..5a7913010 100644
--- a/src/components/cursor-controller.js
+++ b/src/components/cursor-controller.js
@@ -76,8 +76,8 @@ AFRAME.registerComponent("cursor-controller", {
           .applyQuaternion(rayObjectRotation)
           .normalize();
         this.origin.setFromMatrixPosition(this.rayObject.matrixWorld);
+        this.el.setAttribute("raycaster", { origin: this.origin, direction: this.direction });
       }
-      this.el.setAttribute("raycaster", { origin: this.origin, direction: this.direction });
 
       const isGrabbing = this.data.cursor.components["super-hands"].state.has("grab-start");
       if (isGrabbing) {
-- 
GitLab