From 9fb02fd72ef5468de1143852c82197db7187905a Mon Sep 17 00:00:00 2001 From: Artur Arseniev Date: Thu, 14 Jun 2018 08:21:34 +0200 Subject: [PATCH] Get the id of the component if the rule was created --- src/dom_components/model/Component.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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(); }