Browse Source

Fix style properties with undefined. Closes #2206

pull/2219/head
Artur Arseniev 7 years ago
parent
commit
f17c40ac10
  1. 5
      src/style_manager/model/Property.js

5
src/style_manager/model/Property.js

@ -162,12 +162,13 @@ const Property = Backbone.Model.extend(
getFullValue(val) { getFullValue(val) {
const fn = this.get('functionName'); const fn = this.get('functionName');
let value = isUndefined(val) ? this.get('value') : val; let value = isUndefined(val) ? this.get('value') : val;
const hasValue = !isUndefined(value);
if (fn && !isUndefined(value)) { if (fn && hasValue) {
value = `${fn}(${value})`; value = `${fn}(${value})`;
} }
if (this.get('important')) { if (hasValue && this.get('important')) {
value = `${value} !important`; value = `${value} !important`;
} }

Loading…
Cancel
Save