Skip to content

Commit

Permalink
Fix removing layers
Browse files Browse the repository at this point in the history
  • Loading branch information
MiraGeowerkstatt committed Oct 9, 2024
1 parent b577c08 commit bc3cc1a
Showing 1 changed file with 4 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,9 @@ const MapSettings = props => {
data-cy="add-layer-button"
onClick={e => {
e.stopPropagation();
if (_.has(mapSettings, layerType === "WMS" ? layer.Name : layer.identifier)) {
const identifier = layerType === "WMS" ? layer.Name : layer.Identifier;
if (_.has(mapSettings, identifier)) {
layer.Identifier = identifier;
rmExplorerMap(layer);
} else {
const service = layerType === "WMS" ? state.wms : state.wmts;
Expand Down Expand Up @@ -343,6 +345,7 @@ const MapSettings = props => {
onClick={e => {
e.stopPropagation();
if (_.has(mapSettings, key)) {
layer.Identifier = key;
rmExplorerMap(layer);
}
}}
Expand Down

0 comments on commit bc3cc1a

Please sign in to comment.