Mercurial > hg > isophonics-drupal-site
diff core/modules/quickedit/js/theme.es6.js @ 14:1fec387a4317
Update Drupal core to 8.5.2 via Composer
author | Chris Cannam |
---|---|
date | Mon, 23 Apr 2018 09:46:53 +0100 |
parents | 4c8ae668cc8c |
children | 129ea1e6d783 |
line wrap: on
line diff
--- a/core/modules/quickedit/js/theme.es6.js Mon Apr 23 09:33:26 2018 +0100 +++ b/core/modules/quickedit/js/theme.es6.js Mon Apr 23 09:46:53 2018 +0100 @@ -144,14 +144,10 @@ // Attributes. const attributes = []; const attrMap = settings.buttons[i].attributes || {}; - for (const attr in attrMap) { - if (attrMap.hasOwnProperty(attr)) { - attributes.push(attr + ((attrMap[attr]) ? `="${attrMap[attr]}"` : '')); - } - } - html += `<button type="${button.type}" class="${button.classes}"` + ` ${attributes.join(' ')}>`; - html += button.label; - html += '</button>'; + Object.keys(attrMap).forEach((attr) => { + attributes.push(attr + ((attrMap[attr]) ? `="${attrMap[attr]}"` : '')); + }); + html += `<button type="${button.type}" class="${button.classes}" ${attributes.join(' ')}>${button.label}</button>`; } return html; };