From f56794bad4c334dc49fe391f5548e07965fafeb5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=BCrg=20Lehni?= Date: Mon, 24 Jun 2013 04:52:13 -0700 Subject: [PATCH] Remove global variable leakage. --- src/item/Item.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/item/Item.js b/src/item/Item.js index a9bc0b3a..4b47e2e6 100644 --- a/src/item/Item.js +++ b/src/item/Item.js @@ -1437,7 +1437,7 @@ var Item = Base.extend(Callback, /** @lends Item# */{ _hitTest: function(point, options) { if (this._children) { // Loop backwards, so items that get drawn last are tested first - for (var i = this._children.length - 1; i >= 0; i--) + for (var i = this._children.length - 1, res; i >= 0; i--) if (res = this._children[i].hitTest(point, options)) return res; } else if (this.hasFill() && this._contains(point)) {