mirror of
https://github.com/FoggedLens/iD.git
synced 2026-02-13 01:02:58 +00:00
fix crash in zoomToEntity when entity has parent relations
This commit is contained in:
@@ -196,7 +196,9 @@ export function coreContext() {
|
||||
const throttledZoomTo = _throttle(() => _map.zoomTo(loadedEntities), 500);
|
||||
entityIDs.forEach(entityID => context.loadEntity(entityID, (err, result) => {
|
||||
if (err) return;
|
||||
loadedEntities.push(result.data.find(e => e.id === entityID));
|
||||
const entity = result.data.find(e => e.id === entityID);
|
||||
if (!entity) return;
|
||||
loadedEntities.push(entity);
|
||||
if (zoomTo !== false) {
|
||||
throttledZoomTo();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user