1
0
mirror of https://github.com/svg/svgo.git synced 2025-07-29 20:21:14 +03:00

Fix removeViewBox to check for zero start coordinates. Fixes #832

This commit is contained in:
GreLI
2017-11-08 22:01:28 +03:00
parent efcb07ee65
commit f067ea996f
2 changed files with 11 additions and 0 deletions

View File

@ -35,6 +35,8 @@ exports.fn = function(item) {
var nums = item.attr('viewBox').value.split(/[ ,]+/g);
if (
nums[0] === '0' &&
nums[1] === '0' &&
item.attr('width').value.replace(/px$/, '') === nums[2] && // could use parseFloat too
item.attr('height').value.replace(/px$/, '') === nums[3]
) {