Use object.entries

This commit is contained in:
Sam Potts
2018-03-27 10:41:06 +11:00
parent 9c1bc6ab08
commit 5d079da1b8
9 changed files with 23 additions and 12 deletions

View File

@ -319,8 +319,11 @@ const utils = {
return;
}
Object.keys(attributes).forEach(key => {
element.setAttribute(key, attributes[key]);
Object.entries(attributes).forEach(([
key,
value,
]) => {
element.setAttribute(key, value);
});
},