From 10fb61666593a6cc24894c738a7d172fb9d652f4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=BCrg=20Lehni?= Date: Mon, 27 Jul 2015 12:36:45 +0200 Subject: [PATCH] Fixed leaked globals. Detected using QUnit's "Check for Globals" feature! --- src/path/PathItem.Boolean.js | 2 +- src/svg/SVGExport.js | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/path/PathItem.Boolean.js b/src/path/PathItem.Boolean.js index 6608a956..7502a268 100644 --- a/src/path/PathItem.Boolean.js +++ b/src/path/PathItem.Boolean.js @@ -132,7 +132,7 @@ PathItem.inject(new function() { for (var j = 0; j < 3; j++) { // Try the points at 1/4, 2/4 and 3/4 of the total length: var length = totalLength * (j + 1) / 4; - for (k = 0, m = chain.length; k < m; k++) { + for (var k = 0, m = chain.length; k < m; k++) { var node = chain[k], curveLength = node.length; if (length <= curveLength) { diff --git a/src/svg/SVGExport.js b/src/svg/SVGExport.js index 9d99583e..99126cbe 100644 --- a/src/svg/SVGExport.js +++ b/src/svg/SVGExport.js @@ -128,7 +128,7 @@ new function() { if (segments.length >= 3) { type = item._closed ? 'polygon' : 'polyline'; var parts = []; - for(i = 0, l = segments.length; i < l; i++) + for(var i = 0, l = segments.length; i < l; i++) parts.push(formatter.point(segments[i]._point)); attrs.points = parts.join(' '); } else {