mapbox / spritezero

small opinionated sprites
Other
173 stars 62 forks source link

check svg width/height before trying to encode #62

Closed mapsam closed 5 years ago

mapsam commented 5 years ago

What changed?

Adds a zero check for image.width() or image.height() to avoid encoding zero-dimension images from SVGs that have relative width/height dimensions and viewBox values that result in a smaller-than 1x1 pixel ratio.

Also removes node 4 + 6 from travis, tests with 8 + 10

cc @ian29 @artemp

mapsam commented 5 years ago

Thanks @flippmoke!