Fix bug when fitting to non-extistent bounds

This commit is contained in:
Jeremy Ruston
2023-09-09 15:40:55 +01:00
parent 65ac272832
commit fbcea2e26f
@@ -242,7 +242,11 @@ GeomapWidget.prototype.refreshMap = function() {
bounds = featureBounds;
}
});
this.map.fitBounds(bounds);
if(bounds) {
this.map.fitBounds(bounds);
} else {
this.map.fitWorld();
}
break;
default:
this.map.fitWorld();