diff options
author | Sam Potts <sam@potts.es> | 2018-03-27 10:41:06 +1100 |
---|---|---|
committer | Sam Potts <sam@potts.es> | 2018-03-27 10:41:06 +1100 |
commit | 5d079da1b8303b25c4fb5eb176c36403920d5d34 (patch) | |
tree | fc746bae14ae5c6161503b3a0fb0027c091d5ffa /src/js/utils.js | |
parent | 9c1bc6ab08e4fe68565a12f76b58684f4c6a8354 (diff) | |
download | plyr-5d079da1b8303b25c4fb5eb176c36403920d5d34.tar.lz plyr-5d079da1b8303b25c4fb5eb176c36403920d5d34.tar.xz plyr-5d079da1b8303b25c4fb5eb176c36403920d5d34.zip |
Use object.entries
Diffstat (limited to 'src/js/utils.js')
-rw-r--r-- | src/js/utils.js | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/src/js/utils.js b/src/js/utils.js index 172e29ca..18ce6dee 100644 --- a/src/js/utils.js +++ b/src/js/utils.js @@ -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); }); }, |