diff --git a/src/bundle/Resources/public/js/alloyeditor/src/buttons/ez-btn-attributes-update.js b/src/bundle/Resources/public/js/alloyeditor/src/buttons/ez-btn-attributes-update.js index 3d8b267901..498434ad54 100644 --- a/src/bundle/Resources/public/js/alloyeditor/src/buttons/ez-btn-attributes-update.js +++ b/src/bundle/Resources/public/js/alloyeditor/src/buttons/ez-btn-attributes-update.js @@ -143,7 +143,13 @@ export default class EzBtnAttributesUpdate extends EzWidgetButton { return; } - block.$.classList.remove(...this.classes.choices); + const classList = block.$.classList; + + this.classes.choices.forEach((className) => { + if (classList.contains(className)) { + classList.remove(className); + } + }); } saveValues() {