Skip to content

Styleeditor is not working with only two available styles #10961

@dsuren1

Description

@dsuren1

Description

Styleeditor doesn't display the selected style and also restrict user from editing the style due to missing style config. This happens when layer config is fetched to get the correct name and workspace of the styles, resulting in an object and spreading it inside an array results in an exception with missing availableStyle information

const stylesConfig = layerConfig?.styles?.style || [];
const layerConfigAvailableStyles = uniqBy([
layerConfig.defaultStyle,
...stylesConfig
], 'name');

How to reproduce

Use to this map to observe the above behavior
https://dev-mapstore.geosolutionsgroup.com/mapstore/#/viewer/53702

Expected Result
Styleeditor should reflect the correct style selected and allow editing when applicable permissions are in place

  • Not browser related
Browser info (use this site: https://www.whatsmybrowser.org/ for non expert users)
Browser Affected Version
Internet Explorer
Edge
Chrome
Firefox
Safari

Other useful information

Metadata

Metadata

Type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions