Skip to content

Commit

Permalink
Skip sublayers without bbox in LayerUtils.recomputeLayerBBox
Browse files Browse the repository at this point in the history
  • Loading branch information
manisandro committed Mar 27, 2024
1 parent ec36a9b commit 54844de
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion utils/LayerUtils.js
Original file line number Diff line number Diff line change
Expand Up @@ -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]),
Expand Down

0 comments on commit 54844de

Please sign in to comment.