mirror of
https://github.com/iconify/iconify.git
synced 2024-11-09 14:50:56 +00:00
fix: remove attributes instead of setting them to null
This pull request relates to issue #201, which was has been closed. I ran into the same issue I had with the 'inline' attribute in that issue with other attributes like 'height', 'width', etc. I double checked the Iconify docs to ensure none of these affected attributes have a valid use case for a null value.
This commit is contained in:
parent
612d0d9350
commit
965ea9e055
@ -385,7 +385,11 @@ export function defineIconifyIcon(
|
||||
return this.getAttribute(attr);
|
||||
},
|
||||
set: function (value) {
|
||||
this.setAttribute(attr, value);
|
||||
if(value !== null){
|
||||
this.setAttribute(attr, value);
|
||||
}else{
|
||||
this.removeAttribute(attr);
|
||||
}
|
||||
},
|
||||
});
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user