Address small issue in Path#getLocationAt() when paths are empty.

This commit is contained in:
Jürg Lehni 2015-10-24 17:46:20 +02:00
parent fcd4fe824c
commit 19e3136892

View file

@ -1747,7 +1747,7 @@ var Path = PathItem.extend(/** @lends Path# */{
}
// It may be that through imprecision of getLength, that the end of the
// last curve was missed:
if (offset <= this.getLength())
if (curves.length > 0 && offset <= this.getLength())
return new CurveLocation(curves[curves.length - 1], 1);
return null;
},