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:
@ -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]
|
||||
) {
|
||||
|
Reference in New Issue
Block a user