mirror of
https://github.com/svg/svgo.git
synced 2025-07-29 20:21:14 +03:00
Fix empty <svg /> in cleanupIDs plugin
This commit is contained in:
@ -65,7 +65,7 @@ exports.fn = function(data, params) {
|
||||
}
|
||||
|
||||
// Don't remove IDs if the whole SVG consists only of defs.
|
||||
if (item.isElem('svg')) {
|
||||
if (item.isElem('svg') && item.content) {
|
||||
var hasDefsOnly = true;
|
||||
|
||||
for (var j = 0; j < item.content.length; j++) {
|
||||
|
Reference in New Issue
Block a user