From 54844de3298c0e23c3e85bcb6e683ca7a04c54d9 Mon Sep 17 00:00:00 2001 From: Sandro Mani Date: Wed, 27 Mar 2024 15:27:51 +0100 Subject: [PATCH] Skip sublayers without bbox in LayerUtils.recomputeLayerBBox --- utils/LayerUtils.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/utils/LayerUtils.js b/utils/LayerUtils.js index 93b68240a..f8ac3931d 100644 --- a/utils/LayerUtils.js +++ b/utils/LayerUtils.js @@ -986,7 +986,7 @@ const LayerUtils = { sublayer = LayerUtils.recomputeLayerBBox(sublayer); if (!bounds && sublayer.bbox && sublayer.bbox.bounds) { bounds = CoordinatesUtils.reprojectBbox(sublayer.bbox.bounds, sublayer.bbox.crs, "EPSG:4326"); - } else if (bounds) { + } else if (bounds && sublayer.bbox && sublayer.bbox.bounds) { const sublayerbounds = CoordinatesUtils.reprojectBbox(sublayer.bbox.bounds, sublayer.bbox.crs, "EPSG:4326"); bounds = [ Math.min(bounds[0], sublayerbounds[0]),