```javascript pathDataToPolys('M0,0c0,0,0,0,0,0') ```` I was working with an SVG file and it had a degenerate cubic bezier command. The above test case reproduces the issue: Infinite recursion