mirror of
https://github.com/scratchfoundation/paper.js.git
synced 2025-01-07 13:22:07 -05:00
Don't remove the only intersection.
The previous code wrongly compared an intersection with itself while checking for duplicates.
This commit is contained in:
parent
5384a63238
commit
ccbf4579fd
1 changed files with 1 additions and 1 deletions
|
@ -163,7 +163,7 @@ var PathItem = Item.extend(/** @lends PathItem# */{
|
||||||
if (last > 0) {
|
if (last > 0) {
|
||||||
locations.sort(compare);
|
locations.sort(compare);
|
||||||
// Filter out duplicate locations
|
// 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])) {
|
if (locations[i].equals(locations[i === 0 ? last : i - 1])) {
|
||||||
locations.splice(i, 1);
|
locations.splice(i, 1);
|
||||||
last--;
|
last--;
|
||||||
|
|
Loading…
Reference in a new issue