diff --git a/src/dom_components/model/Component.js b/src/dom_components/model/Component.js index 120db697f..cfdab1ab7 100644 --- a/src/dom_components/model/Component.js +++ b/src/dom_components/model/Component.js @@ -368,8 +368,8 @@ const Component = Backbone.Model.extend(Styleable).extend( this.get('classes').each(cls => classes.push(cls.get('name'))); classes.length && (attributes.class = classes.join(' ')); - // If style is not empty I need an ID attached to the component - if (!isEmpty(this.getStyle()) && !has(attributes, 'id')) { + // If the rule is setted we need an ID attached to the component + if (!has(attributes, 'id') && this.rule) { attributes.id = this.getId(); }