2
0
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:
jdevinemt 2023-02-07 15:13:53 -07:00 committed by GitHub
parent 612d0d9350
commit 965ea9e055
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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);
}
},
});
}