Skip to content

Commit

Permalink
fix(layer): fix issue with remove layer index
Browse files Browse the repository at this point in the history
  • Loading branch information
cbourget authored and mbarbeau committed Aug 7, 2020
1 parent 58c0137 commit cb7c1b9
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion packages/geo/src/lib/map/shared/map.ts
Original file line number Diff line number Diff line change
Expand Up @@ -266,7 +266,7 @@ export class IgoMap {
const newLayers = this.layers$.value.slice(0);
const layersToRemove = [];
layers.forEach((layer: Layer) => {
const index = this.getLayerIndex(layer);
const index = newLayers.indexOf(layer);
if (index >= 0) {
layersToRemove.push(layer);
newLayers.splice(index, 1);
Expand Down

0 comments on commit cb7c1b9

Please sign in to comment.