diff --git a/src/css_composer/view/CssRuleView.js b/src/css_composer/view/CssRuleView.js index 9ca35b986..7c93ffc86 100644 --- a/src/css_composer/view/CssRuleView.js +++ b/src/css_composer/view/CssRuleView.js @@ -5,17 +5,16 @@ export default Backbone.View.extend({ initialize(o = {}) { this.config = o.config || {}; - const model = this.model; - const toTrack = 'change:style change:state change:mediaText'; - this.listenTo(model, toTrack, this.render); + const { model } = this; + this.listenTo(model, 'change', this.render); this.listenTo(model, 'destroy remove', this.remove); this.listenTo(model.get('selectors'), 'change', this.render); }, render() { - const model = this.model; + const { model, el } = this; const important = model.get('important'); - this.el.innerHTML = this.model.toCSS({ important }); + el.innerHTML = model.toCSS({ important }); return this; } });