If an input SVG is missing width or height attributes, mapnik.fromSVGBytes will result in an error, which in turn makes generateLayout and generateImage fail.
This PR adds error-handling logic for this situation to instead callback with a null result, allowing the other layout sprite or image result to still be produced with the remaining "good" SVGs.
If an input SVG is missing
width
orheight
attributes,mapnik.fromSVGBytes
will result in an error, which in turn makesgenerateLayout
andgenerateImage
fail.This PR adds error-handling logic for this situation to instead callback with a
null
result, allowing the other layout sprite or image result to still be produced with the remaining "good" SVGs.This is essentially an addendum to https://github.com/mapbox/spritezero/pull/62.
cc @aparlato @samanpwbb