Don't remove the only intersection.

The previous code wrongly compared an intersection with itself while checking for duplicates.
This commit is contained in:
hkrish 2014-06-21 10:31:07 +02:00
parent 5384a63238
commit ccbf4579fd

View file

@ -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--;