mirror of
https://github.com/scratchfoundation/paper.js.git
synced 2025-01-05 20:32:00 -05:00
Address small issue in Path#getLocationAt() when paths are empty.
This commit is contained in:
parent
fcd4fe824c
commit
19e3136892
1 changed files with 1 additions and 1 deletions
|
@ -1747,7 +1747,7 @@ var Path = PathItem.extend(/** @lends Path# */{
|
||||||
}
|
}
|
||||||
// It may be that through imprecision of getLength, that the end of the
|
// It may be that through imprecision of getLength, that the end of the
|
||||||
// last curve was missed:
|
// last curve was missed:
|
||||||
if (offset <= this.getLength())
|
if (curves.length > 0 && offset <= this.getLength())
|
||||||
return new CurveLocation(curves[curves.length - 1], 1);
|
return new CurveLocation(curves[curves.length - 1], 1);
|
||||||
return null;
|
return null;
|
||||||
},
|
},
|
||||||
|
|
Loading…
Reference in a new issue