Skip to content

Commit 523aebb

Browse files
committed
Fix starting zIndex not set (check for falsey, including null and
undefined, see this [article](https://codeburst.io/javascript-null-vs-undefined-20f955215a2#5317)).
1 parent faaa475 commit 523aebb

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/mapml/layers/MapLayer.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -256,7 +256,7 @@ export var MapMLLayer = L.Layer.extend({
256256
if (this._extent && this._extent._mapExtents && this._extent._mapExtents[0]._templateVars) {
257257
for(let i = 0; i < this._extent._mapExtents.length; i++){
258258
if (this._extent._mapExtents[i]._templateVars && this._extent._mapExtents[i].checked) {
259-
if(this._extent._mapExtents[i].extentZIndex === null) this._extent._mapExtents[i].extentZIndex = i;
259+
if(!this._extent._mapExtents[i].extentZIndex) this._extent._mapExtents[i].extentZIndex = i;
260260
this._templatedLayer = M.templatedLayer(this._extent._mapExtents[i]._templateVars,
261261
{ pane: this._container,
262262
_leafletLayer: this,

0 commit comments

Comments
 (0)