Code cleanup con CodeMaid
This commit is contained in:
@@ -7,12 +7,12 @@
|
||||
* Object with a list of properties and values which will be applied to the element
|
||||
*/
|
||||
export default function setAttributes(element, attributes) {
|
||||
Object.keys(attributes).forEach(function(prop) {
|
||||
const value = attributes[prop];
|
||||
if (value !== false) {
|
||||
element.setAttribute(prop, attributes[prop]);
|
||||
} else {
|
||||
element.removeAttribute(prop);
|
||||
}
|
||||
});
|
||||
}
|
||||
Object.keys(attributes).forEach(function (prop) {
|
||||
const value = attributes[prop];
|
||||
if (value !== false) {
|
||||
element.setAttribute(prop, attributes[prop]);
|
||||
} else {
|
||||
element.removeAttribute(prop);
|
||||
}
|
||||
});
|
||||
}
|
||||
Reference in New Issue
Block a user