diff --git a/src/style_manager/model/Layer.js b/src/style_manager/model/Layer.js index 7b35ad3cb..a082fa5e1 100644 --- a/src/style_manager/model/Layer.js +++ b/src/style_manager/model/Layer.js @@ -18,7 +18,10 @@ module.exports = Backbone.Model.extend({ 'properties', properties instanceof Properties ? properties : new Properties(properties) ); - this.get('properties').forEach(item => item.parent = this.collection.property); + this.get('properties').forEach(item => { + const { collection } = this; + item.parent = collection && collection.property; + }); // If there is no value I'll try to get it from values // I need value setted to make preview working diff --git a/test/specs/style_manager/model/Models.js b/test/specs/style_manager/model/Models.js index 53fea9d58..9dd0cdb3f 100644 --- a/test/specs/style_manager/model/Models.js +++ b/test/specs/style_manager/model/Models.js @@ -703,7 +703,7 @@ module.exports = { property: 'border-top-left-radius', type: 'integer', units: ['px', '%'], - defaults: 0, + defaults: '0px', min: 0 }, { @@ -711,21 +711,21 @@ module.exports = { type: 'integer', units: ['px', '%'], min: 0, - defaults: 0 + defaults: '0px' }, { property: 'border-bottom-left-radius', type: 'integer', units: ['px', '%'], min: 0, - defaults: 0 + defaults: '0px' }, { property: 'border-bottom-right-radius', type: 'integer', units: ['px', '%'], min: 0, - defaults: 0 + defaults: '0px' } ] };