Merge pull request #181 from paulkaplan/fix-stroke-measurement
Use zero if cannot parse stroke width
This commit is contained in:
commit
998d3e129a
@ -197,7 +197,10 @@ class SvgRenderer {
|
||||
largestStrokeWidth = Math.max(largestStrokeWidth, 1);
|
||||
}
|
||||
if (domElement.getAttribute('stroke-width')) {
|
||||
largestStrokeWidth = Math.max(largestStrokeWidth, Number(domElement.getAttribute('stroke-width')));
|
||||
largestStrokeWidth = Math.max(
|
||||
largestStrokeWidth,
|
||||
Number(domElement.getAttribute('stroke-width')) || 0
|
||||
);
|
||||
}
|
||||
}
|
||||
for (let i = 0; i < domElement.childNodes.length; i++) {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user