From c3a65bab38d223442b4cb1bd8efa70a7ae0aeb93 Mon Sep 17 00:00:00 2001 From: larissasmith Date: Mon, 10 Jul 2017 13:54:20 -0600 Subject: [PATCH] Replace filter with a for loop. --- src/mousetracker.js | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/src/mousetracker.js b/src/mousetracker.js index 76518f87..2db54b42 100644 --- a/src/mousetracker.js +++ b/src/mousetracker.js @@ -325,10 +325,15 @@ */ getActivePointersListExceptType: function ( type ) { var delegate = THIS[ this.hash ]; + var listArray = []; - return delegate.activePointersLists.filter(function(pointersList) { - return pointersList.type !== type; - }); + for (var i = 0; i < delegate.activePointersLists.length; ++i) { + if (delegate.activePointersLists[i].type !== type) { + listArray.push(delegate.activePointersLists[i]); + } + } + + return listArray; }, /**