From 993a9df178c32158ef8fbbb02bac1d10bce77ac6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ju=CC=88rg=20Lehni?= Date: Sat, 28 Feb 2015 19:20:48 +0100 Subject: [PATCH] Simplify fix for #626 a bit. Closes #626. --- src/path/PathItem.js | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/src/path/PathItem.js b/src/path/PathItem.js index 6983175a..fa8f297b 100644 --- a/src/path/PathItem.js +++ b/src/path/PathItem.js @@ -163,8 +163,6 @@ var PathItem = Item.extend(/** @lends PathItem# */{ current = new Point(), start = new Point(); - if (!parts) return; - function getCoord(index, coord) { var val = +coords[index]; if (relative) @@ -182,7 +180,7 @@ var PathItem = Item.extend(/** @lends PathItem# */{ // First clear the previous content this.clear(); - for (var i = 0, l = parts.length; i < l; i++) { + for (var i = 0, l = parts && parts.length; i < l; i++) { var part = parts[i], command = part[0], lower = command.toLowerCase();