Don't call updateLayers if the new state has no layer config
Fixes #719
This commit is contained in:
parent
82ff8ef58d
commit
24e22dde6e
1 changed files with 1 additions and 1 deletions
|
@ -241,7 +241,7 @@ L.OSM.Map = L.Map.extend({
|
|||
|
||||
setState: function(state, options) {
|
||||
if (state.center) this.setView(state.center, state.zoom, options);
|
||||
this.updateLayers(state.layers);
|
||||
if (state.layers) this.updateLayers(state.layers);
|
||||
}
|
||||
});
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue