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

Don't remove empty patterns with inheritance

This commit is contained in:
GreLI
2015-04-12 21:08:34 +03:00
parent f651fd8de1
commit d0a5d0e87d
3 changed files with 17 additions and 3 deletions

View File

@ -24,6 +24,7 @@ var container = require('./_collections').elemsGroups.container;
*/
exports.fn = function(item) {
return !(item.isElem(container) && !item.isElem('svg') && item.isEmpty());
return !(item.isElem(container) && !item.isElem('svg') && item.isEmpty() &&
(!item.isElem('pattern') || !item.hasAttr('xlink:href')));
};