Geometry path string syntax does not support SVG abbreviated syntax

Walter I share in this post a little issue with a simple SVG :

<svg xmlns="" width="25" height="33" viewBox="0 0 25 33"><path fill="gray" d="M16.3 7.33c-.2-.26-.35-.5-.46-.72.56-.66.9-1.53.9-2.5 0-2.25-1.87-4.1-4.18-4.1-2.3 0-4.16 1.86-4.16 4.1 0 .9.3 1.77.82 2.45-.1.24-.26.5-.48.8H2.9C1.3 7.35 0 8.6 0 10.18v6.24c0 1.48-.7 2.34-.7 2.33 0 4.22 1.86 4.22 4.15s-1.9 4.14-4.22 4.14c-.98 0-1.87-.3-2.6-.85-.35-.28-.64 0-.64.78v5.44C0 31.72 1.3 33 2.9 33h19.2c1.6 0 2.9-1.28 2.9-2.86V10.18c0-1.57-1.3-2.85-2.9-2.85h-5.8z"/></svg>

GoJS return an error :

Error: PathSegment.endX must be a real number type, and not NaN or Infinity: NaN

I have double check the SVG with illustrator and another soft, I dont see any error.

Do you have an idea ?


We probably do not parse numbers like this the same as the SVG renderer does. I’m surprised it accepts them…

Ok I understand. SVG format allow to simplify 0 numbers so :

1.752, 0.827, 0.53

Becomes :


Right, and we’re not very good at parsing that, sorry. We will probably improve this for 2.0, but that may be a while.

Dont worry simon ! At this time I think Illustrator doesn’t compress SVG. It’s only with tools or (gulp) script using svgo or library like this. However you should not split this topic in two (one for the node inheritance the second for this SVG error) ?