From debdc26fd2b694b9a66214dc42a357940aeee3c2 Mon Sep 17 00:00:00 2001 From: tsauerwein Date: Thu, 13 Mar 2014 13:14:11 +0100 Subject: [PATCH] Remove assignment inside expression --- src/ol/pointer/touchsource.js | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/ol/pointer/touchsource.js b/src/ol/pointer/touchsource.js index 63d8ca68f2..76109d0b0e 100644 --- a/src/ol/pointer/touchsource.js +++ b/src/ol/pointer/touchsource.js @@ -238,8 +238,11 @@ ol.pointer.TouchSource.prototype.processTouches_ = * @return {boolean} True, if the `Touch` with the given id is in the list. */ ol.pointer.TouchSource.prototype.findTouch_ = function(touchList, searchId) { - for (var i = 0, l = touchList.length, t; i < l && (t = touchList[i]); i++) { - if (t.identifier === searchId) { + var l = touchList.length; + var touch; + for (var i = 0; i < l; i++) { + touch = touchList[i]; + if (touch.identifier === searchId) { return true; } }