From 19e3136892a909189a8411193f365ebf9a5753d6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=BCrg=20Lehni?= Date: Sat, 24 Oct 2015 17:46:20 +0200 Subject: [PATCH] Address small issue in Path#getLocationAt() when paths are empty. --- src/path/Path.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/path/Path.js b/src/path/Path.js index cf8f4868..889584ee 100644 --- a/src/path/Path.js +++ b/src/path/Path.js @@ -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; },