From f17c40ac105754b88e259ef4822ce2fadb4f35d7 Mon Sep 17 00:00:00 2001 From: Artur Arseniev Date: Sun, 25 Aug 2019 19:52:24 +0200 Subject: [PATCH] Fix style properties with undefined. Closes #2206 --- src/style_manager/model/Property.js | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/style_manager/model/Property.js b/src/style_manager/model/Property.js index 7eee21631..cdf6624cb 100644 --- a/src/style_manager/model/Property.js +++ b/src/style_manager/model/Property.js @@ -162,12 +162,13 @@ const Property = Backbone.Model.extend( getFullValue(val) { const fn = this.get('functionName'); let value = isUndefined(val) ? this.get('value') : val; + const hasValue = !isUndefined(value); - if (fn && !isUndefined(value)) { + if (fn && hasValue) { value = `${fn}(${value})`; } - if (this.get('important')) { + if (hasValue && this.get('important')) { value = `${value} !important`; }