Docs: improve error message if something goes wrong in the image upload

This commit is contained in:
Pieter Vander Vennet 2024-12-06 01:20:41 +01:00
parent 557b41d70f
commit c002d66329

View file

@ -170,6 +170,9 @@ export class ImageUploadManager {
} }
if (location === undefined || location?.some((l) => l === undefined)) { if (location === undefined || location?.some((l) => l === undefined)) {
feature ??= this._indexedFeatures.featuresById.data.get(featureId) feature ??= this._indexedFeatures.featuresById.data.get(featureId)
if(feature === undefined){
throw "ImageUploadManager: no feature given and no feature found in the indexedFeature. Cannot upload this image"
}
location = GeoOperations.centerpointCoordinates(feature) location = GeoOperations.centerpointCoordinates(feature)
} }
try { try {