Check for null before setting the zindex, and instead keep it null initially. This way calls to setZIndex() wont fail if passed null.
This commit is contained in:
parent
756888cee7
commit
ff10d00297
@ -15,7 +15,7 @@ L.GridLayer = L.Layer.extend({
|
|||||||
updateInterval: 200,
|
updateInterval: 200,
|
||||||
|
|
||||||
attribution: null,
|
attribution: null,
|
||||||
zIndex: 'auto',
|
zIndex: null,
|
||||||
bounds: null,
|
bounds: null,
|
||||||
|
|
||||||
minZoom: 0
|
minZoom: 0
|
||||||
@ -124,7 +124,7 @@ L.GridLayer = L.Layer.extend({
|
|||||||
},
|
},
|
||||||
|
|
||||||
_updateZIndex: function () {
|
_updateZIndex: function () {
|
||||||
if (this._container && this.options.zIndex !== undefined) {
|
if (this._container && this.options.zIndex !== undefined && this.options.zIndex !== null) {
|
||||||
this._container.style.zIndex = this.options.zIndex;
|
this._container.style.zIndex = this.options.zIndex;
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
Loading…
Reference in New Issue
Block a user