Skip to content
Snippets Groups Projects
Commit 593699a7 authored by joni's avatar joni
Browse files

Use Array.prototype.some

parent 103314c0
No related branches found
No related tags found
No related merge requests found
......@@ -312,7 +312,7 @@ AFRAME.registerComponent("cursor-controller", {
!this.isMobile ||
this.hasPointingDevice ||
!this.activeTouch ||
this.some(e.touches, touch => touch.identifier === this.activeTouch.identifier)
Array.prototype.some.call(e.touches, touch => touch.identifier === this.activeTouch.identifier)
) {
return;
}
......@@ -443,12 +443,5 @@ AFRAME.registerComponent("cursor-controller", {
} else {
this.controller = null;
}
},
some: function(a, fn) {
for (let i = 0; i < a.length; a++) {
if (fn(a[i])) return true;
}
return false;
}
});
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment