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

@ -7094,8 +7094,12 @@ var utils = {
return;
}
Object.keys(attributes).forEach(function (key) {
element.setAttribute(key, attributes[key]);
Object.entries(attributes).forEach(function (_ref) {
var _ref2 = slicedToArray(_ref, 2),
key = _ref2[0],
value = _ref2[1];
element.setAttribute(key, value);
});
},