From 47e5a0676ac452f9dab0d0ab635bb013823e1d02 Mon Sep 17 00:00:00 2001 From: Yohan Boniface Date: Tue, 24 Oct 2023 15:06:13 +0200 Subject: [PATCH] Fix max not loading when defaultView=latest and datalayer has no data When the default datalayer has no data, we need a fallback fix #1374 --- umap/static/umap/js/umap.js | 1 + 1 file changed, 1 insertion(+) diff --git a/umap/static/umap/js/umap.js b/umap/static/umap/js/umap.js index 6cdabc40..b923e2b3 100644 --- a/umap/static/umap/js/umap.js +++ b/umap/static/umap/js/umap.js @@ -697,6 +697,7 @@ L.U.Map.include({ const datalayer = this.defaultDataLayer(), feature = datalayer.getFeatureByIndex(-1) if (feature) feature.zoomTo() + else this._setDefaultCenter() }) } else { this._setDefaultCenter()