diff --git a/src/leaflet.groupedlayercontrol.js b/src/leaflet.groupedlayercontrol.js index 95a3b35..ff73ea6 100644 --- a/src/leaflet.groupedlayercontrol.js +++ b/src/leaflet.groupedlayercontrol.js @@ -66,7 +66,7 @@ L.Control.GroupedLayers = L.Control.extend({ var id = L.Util.stamp(layer); var _layer = this._getLayer(id); if (_layer) { - delete this.layers[this.layers.indexOf(_layer)]; + delete this._layers[this._layers.indexOf(_layer)]; } this._update(); return this;