mirror of
https://github.com/FoggedLens/iD.git
synced 2026-02-12 16:52:50 +00:00
Handle situation where nodes have no loc (like in tests)
This commit is contained in:
@@ -345,9 +345,11 @@ export function osmIntersection(graph, startVertexId) {
|
||||
n2 = vgraph.entity(way.nodes[0]);
|
||||
}
|
||||
|
||||
var toLoc = geoVecInterp(n1.loc, n2.loc, 10); // extend 1000%
|
||||
n2 = n2.move(toLoc);
|
||||
vgraph = vgraph.replace(n2);
|
||||
if (n1.loc && n2.loc) {
|
||||
var toLoc = geoVecInterp(n1.loc, n2.loc, 10); // extend 1000%
|
||||
n2 = n2.move(toLoc);
|
||||
vgraph = vgraph.replace(n2);
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user