From 12de1d57c919cb85428bdab899386b8297b30c3c Mon Sep 17 00:00:00 2001 From: Artur Arseniev Date: Sun, 7 Oct 2018 23:23:56 +0200 Subject: [PATCH] Fix regressions --- src/style_manager/model/Layers.js | 3 ++- test/specs/style_manager/index.js | 1 + test/specs/style_manager/model/Models.js | 4 ++-- 3 files changed, 5 insertions(+), 3 deletions(-) diff --git a/src/style_manager/model/Layers.js b/src/style_manager/model/Layers.js index 1cfa4900a..79bbfeb7b 100644 --- a/src/style_manager/model/Layers.js +++ b/src/style_manager/model/Layers.js @@ -19,7 +19,8 @@ module.exports = Backbone.Collection.extend({ }, getSeparator() { - return this.property.get('layerSeparator'); + const { property } = this; + return property ? property.get('layerSeparator') : ', '; }, /** diff --git a/test/specs/style_manager/index.js b/test/specs/style_manager/index.js index d1feb2cce..8ed458eaa 100644 --- a/test/specs/style_manager/index.js +++ b/test/specs/style_manager/index.js @@ -155,6 +155,7 @@ describe('StyleManager', () => { } ] }); + obj.onLoad(); }); afterEach(() => { diff --git a/test/specs/style_manager/model/Models.js b/test/specs/style_manager/model/Models.js index a5579a9fe..012b5f0a7 100644 --- a/test/specs/style_manager/model/Models.js +++ b/test/specs/style_manager/model/Models.js @@ -155,7 +155,7 @@ module.exports = { test('parseValue with function and functionName', () => { obj = new Property({ functionName: 'fn' }); - const result = { value: 'testValue' }; + const result = { value: 'testValue', functionName: 'fn' }; expect(obj.parseValue('fn(testValue)')).toEqual(result); expect(obj.parseValue('fn(testValue')).toEqual(result); }); @@ -194,7 +194,7 @@ module.exports = { units: ['px', 'deg'], functionName: 'test' }); - const result = { value: 55, unit: 'deg' }; + const result = { value: 55, unit: 'deg', functionName: 'test' }; expect(obj.parseValue('test(55deg)')).toEqual(result); });