diff --git a/src/dom_components/view/ComponentView.js b/src/dom_components/view/ComponentView.js index 40fde2e90..398e2b3cd 100644 --- a/src/dom_components/view/ComponentView.js +++ b/src/dom_components/view/ComponentView.js @@ -293,7 +293,7 @@ export default Backbone.View.extend({ * */ updateAttributes() { const attrs = []; - const { model, $el, el, config } = this; + const { model, $el, el } = this; const { highlightable, textable, type } = model.attributes; const defaultAttr = { @@ -311,6 +311,7 @@ export default Backbone.View.extend({ // Remove all current attributes each(el.attributes, attr => attrs.push(attr.nodeName)); attrs.forEach(attr => $el.removeAttr(attr)); + this.updateStyle(); const attr = { ...defaultAttr, ...model.getAttributes() @@ -320,7 +321,6 @@ export default Backbone.View.extend({ keys(attr).forEach(key => attr[key] === false && delete attr[key]); $el.attr(attr); - this.updateStyle(); }, /**