mirror of
https://github.com/FoggedLens/iD.git
synced 2026-02-12 16:52:50 +00:00
Avoid error if detection images haven't been loaded yet
This commit is contained in:
@@ -113,7 +113,7 @@ export function svgMapillaryMapFeatures(projection, context, dispatch) {
|
||||
return feature.detections.some(function(detection) {
|
||||
var imageKey = detection.image_key;
|
||||
var image = service.cachedImage(imageKey);
|
||||
return usernames.indexOf(image.captured_by) !== -1;
|
||||
return image && usernames.indexOf(image.captured_by) !== -1;
|
||||
});
|
||||
});
|
||||
}
|
||||
|
||||
@@ -114,7 +114,7 @@ export function svgMapillarySigns(projection, context, dispatch) {
|
||||
return feature.detections.some(function(detection) {
|
||||
var imageKey = detection.image_key;
|
||||
var image = service.cachedImage(imageKey);
|
||||
return usernames.indexOf(image.captured_by) !== -1;
|
||||
return image && usernames.indexOf(image.captured_by) !== -1;
|
||||
});
|
||||
});
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user