Open e-pavlica opened 4 years ago
Merging #5 into master will not change coverage. The diff coverage is
100.00%
.
@@ Coverage Diff @@
## master #5 +/- ##
=========================================
Coverage 100.00% 100.00%
=========================================
Files 1 1
Lines 29 30 +1
Branches 6 7 +1
=========================================
+ Hits 29 30 +1
Impacted Files | Coverage Δ | |
---|---|---|
src/index.js | 100.00% <100.00%> (ø) |
Continue to review full report at Codecov.
Legend - Click here to learn more
Δ = absolute <relative> (impact)
,ø = not affected
,? = missing data
Powered by Codecov. Last update f00ef0a...3deed80. Read the comment docs.
Some of the older SVGs that our application uses were exported were exported with a
height
andwidth
, but noviewBox
causing this plugin to break. The "correct" way to fix this problem would be to correct the SVG sources, but that was not something I wanted to pursue.As a non-perfect fallback for this situation, use the height and width attributes to construct a viewBox string so that compilation can continue.
I didn't add a test for this as I was reluctant to add another fixture to the repo, but can if you prefer.
I also thought about adding a console warning for SVGs missing the
viewBox
attr but thought that might just be annoying/heavy-handed.