mirror of
https://github.com/svg/svgo.git
synced 2025-07-31 07:44:22 +03:00
Access attributes directly (#1433)
Got rid from `.attrs`, `.attr()` and `.addAttr()` usages
This commit is contained in:
@ -30,7 +30,7 @@ exports.fn = function (item) {
|
||||
(item.type === 'element' && item.children.length !== 0) ||
|
||||
item.isElem('svg') ||
|
||||
// empty patterns may contain reusable configuration
|
||||
(item.isElem('pattern') && Object.keys(item.attrs).length !== 0) ||
|
||||
(item.isElem('pattern') && Object.keys(item.attributes).length !== 0) ||
|
||||
// The 'g' may not have content, but the filter may cause a rectangle
|
||||
// to be created and filled with pattern.
|
||||
(item.isElem('g') && item.hasAttr('filter')) ||
|
||||
|
Reference in New Issue
Block a user