Closed marr closed 6 years ago
Thanks for the report. It would help most to have a pared-down version of your SVG that reproduces this problem, but let me look into the underlying xml2js
library and see if I can suss out why it doesn't have a $$
collection.
A random guess: does your SVG file have group elements with no child elements, e.g. <g …/>
or <g …></g>
? If so, you can either pre-process your SVG files and hand-delete these, or you can add a simple (if el.$$)
prefix before that offending line, until I get a chance to release a fixed version.
Thanks for the response Phrogz. I believe it is due to the empty <g />
. I can submit a PR.
Hi, Thanks for the work on this library! I think it will be a good solution once i can get my svg to parse correctly. I am using the
geoFromSVGXML
function and getting an error in theaddGroupToLayer
call.I've screenshotted it in case that helps but what seems to be happening is that the method expects![screen shot 2017-08-16 at 9 27 19 am](https://user-images.githubusercontent.com/44376/29374225-796c4b62-8265-11e7-8194-e86ab92beae8.png)
el.$$
to be an array, and in the case I am seeing, its actually undefined.