From b06cfca1f2ab6869edddacc065e71e226e476ed5 Mon Sep 17 00:00:00 2001 From: Yohan Boniface Date: Tue, 15 Aug 2023 22:26:33 +0200 Subject: [PATCH] Revert "More readable check from DataLayer.showAtZoom" This reverts commit c0dd8901e4da4024d6f8226764d5ff6a7a5a5875. --- umap/static/umap/js/umap.layer.js | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/umap/static/umap/js/umap.layer.js b/umap/static/umap/js/umap.layer.js index 590d69d3..a0d677e5 100644 --- a/umap/static/umap/js/umap.layer.js +++ b/umap/static/umap/js/umap.layer.js @@ -390,8 +390,7 @@ L.U.DataLayer = L.Evented.extend({ const from = parseInt(this.options.fromZoom, 10), to = parseInt(this.options.toZoom, 10), zoom = this.map.getZoom() - if (isNaN(from) || isNaN(to)) return false - return (zoom >= from && zoom <= to) + return !((!isNaN(from) && zoom < from) || (!isNaN(to) && zoom > to)) }, fetchRemoteData: function () {