webpack-svgstore-plugin icon indicating copy to clipboard operation
webpack-svgstore-plugin copied to clipboard

NaN in svg path

Open playlikednb opened this issue 5 years ago • 1 comments

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>

playlikednb avatar Oct 04 '19 14:10 playlikednb

I was also running into this issue. Updating the SVGO dependency fixed if for me. https://github.com/mrsum/webpack-svgstore-plugin/pull/180

ryan-ludwig avatar Mar 18 '20 23:03 ryan-ludwig