From 6cadd63d72bdb4f809f4aa14df9c197b3c3f7cb8 Mon Sep 17 00:00:00 2001
From: joni <johnfshaughnessy@gmail.com>
Date: Tue, 8 May 2018 14:47:35 -0700
Subject: [PATCH] Name array of function names to bind.

---
 src/components/cursor-controller.js | 7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)

diff --git a/src/components/cursor-controller.js b/src/components/cursor-controller.js
index 7cc12441d..0a921397c 100644
--- a/src/components/cursor-controller.js
+++ b/src/components/cursor-controller.js
@@ -41,7 +41,7 @@ AFRAME.registerComponent("cursor-controller", {
 
     this.data.cursor.setAttribute("material", { color: this.data.cursorColorUnhovered });
 
-    [
+    const functionNames = [
       "_handleTouchStart",
       "_handleTouchMove",
       "_handleTouchEnd",
@@ -56,8 +56,9 @@ AFRAME.registerComponent("cursor-controller", {
       "_handleModelLoaded",
       "_handleControllerConnected",
       "_handleControllerDisconnected"
-    ].map(fn => {
-      this[fn] = this[fn].bind(this);
+    ];
+    functionNames.forEach(name => {
+      this[name] = this[name].bind(this);
     });
   },
 
-- 
GitLab