Skip to content
This repository has been archived by the owner on Mar 18, 2023. It is now read-only.

NaN in svg path #176

Open
playlikednb opened this issue Oct 4, 2019 · 1 comment
Open

NaN in svg path #176

playlikednb opened this issue Oct 4, 2019 · 1 comment

Comments

@playlikednb
Copy link

I have an icon with a path like that:
image
When it got parsed by the parseFiles fn, it becomes broken because of NaN's in its path:
image
The problem is that Arcs in a path have up to 7 parameters. But there 2 last ones are optional. So, if I put an icon with 5 parameters for an Arc, it becomes broken after it's parsed by Svgstore.

The icon
<svg width="16" height="17" xmlns="http://www.w3.org/2000/svg"> <path d="M7.03 1.1c0-.324.24-.593.551-.639l.096-.007h6.206a2.12 2.12 0 012.112 1.966l.005.151v12.295a2.12 2.12 0 01-1.966 2.112l-.151.005H7.677a.646.646 0 01-.096-1.285l.096-.007h6.206c.42 0 .767-.315.818-.721l.006-.104V2.571a.826.826 0 00-.72-.818l-.104-.006H7.677A.646.646 0 017.03 1.1zm4.55 7.714v.003l.008-.098a.646.646 0 01-.117.37l-.006.01-.01.013a.65.65 0 01-.045.052l-.012.012-2.941 2.941a.646.646 0 01-.982-.834l.068-.08 1.838-1.838H.646a.646.646 0 01-.639-.55L0 8.718c0-.357.29-.647.646-.647l8.735.001-1.838-1.839a.646.646 0 01.834-.982l.08.068 2.941 2.942.013.013a.65.65 0 01.038.044l-.05-.057a.646.646 0 01.189.457z" fill="#FFF" fill-rule="nonzero"/> </svg>

@ryan-ludwig
Copy link

I was also running into this issue. Updating the SVGO dependency fixed if for me. #180

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants