don't try to call Entity#geometry for midpoints

This commit is contained in:
Bryan Housel
2014-11-21 10:58:32 -05:00
parent ebaaa4ba5a
commit 3e391e87df
+2 -2
View File
@@ -357,12 +357,12 @@ iD.Features = function(context) {
if (entity.type === 'midpoint') {
childNodes = [resolver.entity(entity.edge[0]), resolver.entity(entity.edge[1])];
connections = [];
} else {
childNodes = resolver.childNodes(entity);
connections = features.getParents(entity, resolver, entity.geometry(resolver));
}
// gather parents..
connections = features.getParents(entity, resolver, entity.geometry(resolver));
// gather ways connected to child nodes..
connections = _.reduce(childNodes, function(result, e) {
return resolver.isShared(e) ? _.union(result, resolver.parentWays(e)) : result;