From ccbf4579fd788b4b6b4d227fb51d8461fe22df8a Mon Sep 17 00:00:00 2001 From: hkrish Date: Sat, 21 Jun 2014 10:31:07 +0200 Subject: [PATCH] Don't remove the only intersection. The previous code wrongly compared an intersection with itself while checking for duplicates. --- src/path/PathItem.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/path/PathItem.js b/src/path/PathItem.js index d3590611..0491e04f 100644 --- a/src/path/PathItem.js +++ b/src/path/PathItem.js @@ -163,7 +163,7 @@ var PathItem = Item.extend(/** @lends PathItem# */{ if (last > 0) { locations.sort(compare); // Filter out duplicate locations - for (var i = last; i >= 0; i--) { + for (var i = last; i >= 1; i--) { if (locations[i].equals(locations[i === 0 ? last : i - 1])) { locations.splice(i, 1); last--;