Keep accuracy handles from throwing errors

This commit is contained in:
Tom MacWright
2012-12-05 17:02:46 -05:00
parent 5e56b12d85
commit c4c3ecd4fd
+4 -2
View File
@@ -25,8 +25,10 @@ iD.Map = function() {
if (!dragging) {
if (entity.accuracy) {
var way = history.graph().entity(entity.way);
history.perform(iD.actions.AddWayNode(way, iD.Node(entity), entity.index));
var way = history.graph().entity(entity.way),
index = entity.index;
entity = iD.Node(entity);
history.perform(iD.actions.AddWayNode(way, entity, index));
}
dragging = iD.util.trueObj([entity.id].concat(