mirror of
https://github.com/svg/svgo.git
synced 2025-10-20 12:32:25 +03:00
plugins/removeViewBox: fix global scope leak
This commit is contained in:
@@ -26,6 +26,8 @@ exports.removeViewBox = function(item, params) {
|
|||||||
item.hasAttr('height')
|
item.hasAttr('height')
|
||||||
) {
|
) {
|
||||||
|
|
||||||
|
var match;
|
||||||
|
|
||||||
if (match = item.attr('viewBox').value.match(regViewBox)) {
|
if (match = item.attr('viewBox').value.match(regViewBox)) {
|
||||||
if (
|
if (
|
||||||
item.attr('width').value == match[1] &&
|
item.attr('width').value == match[1] &&
|
||||||
|
Reference in New Issue
Block a user