Commit ca35034d authored by Tomas Pettersson's avatar Tomas Pettersson 🏸

clear fix

parent 12d9af40
......@@ -346,7 +346,7 @@ L.TimeDimension.Layer.WMS.Picasso = L.TimeDimension.Layer.WMS.extend({
}
},
clear : function() {
if (this._map.hasLayer(this._baseLayer)) {
if (this._map && this._map.hasLayer(this._baseLayer)) {
this._map.removeLayer(this._baseLayer);
}
for (var prop in this._layers) {
......
This diff is collapsed.
This diff is collapsed.
......@@ -132,7 +132,7 @@ L.TimeDimension.Layer.WMS.Picasso = L.TimeDimension.Layer.WMS.extend({
}
},
clear : function() {
if (this._map.hasLayer(this._baseLayer)) {
if (this._map && this._map.hasLayer(this._baseLayer)) {
this._map.removeLayer(this._baseLayer);
}
for (var prop in this._layers) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment