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

Replace removeAttr with delete operator (#1432)

delete operator is more explicit and not much harder to use.
This commit is contained in:
Bogdan Chadkin
2021-03-17 21:40:06 +03:00
committed by GitHub
parent 8098ab7fb6
commit 07928fc77e
24 changed files with 138 additions and 121 deletions

View File

@ -135,7 +135,7 @@ exports.fn = function (item, params) {
if (pattern[1].test(name)) {
// matches attribute value
if (pattern[2].test(value)) {
item.removeAttr(name);
delete item.attributes[name];
}
}
}