mirror of
https://github.com/svg/svgo.git
synced 2025-07-31 07:44:22 +03:00
Replace removeAttr with delete operator (#1432)
delete operator is more explicit and not much harder to use.
This commit is contained in:
@ -21,7 +21,7 @@ exports.description =
|
||||
* @author Ricardo Tomasi
|
||||
*/
|
||||
exports.fn = function (item) {
|
||||
if (item.isElem('svg') && item.hasAttr('xmlns')) {
|
||||
item.removeAttr('xmlns');
|
||||
if (item.type === 'element' && item.name === 'svg') {
|
||||
delete item.attributes.xmlns;
|
||||
}
|
||||
};
|
||||
|
Reference in New Issue
Block a user