diff --git a/js/id/graph/graph.js b/js/id/graph/graph.js index 0ca40b3a2..bc152270b 100644 --- a/js/id/graph/graph.js +++ b/js/id/graph/graph.js @@ -157,12 +157,9 @@ iD.Graph.prototype = { }, difference: function (graph) { - var result = [], - keys = Object.keys(this.entities), - entity, oldentity, id, i; + var result = [], entity, oldentity, id; - for (i = 0; i < keys.length; i++) { - id = keys[i]; + for (id in this.entities) { entity = this.entities[id]; oldentity = graph.entities[id]; if (entity !== oldentity) { @@ -184,9 +181,7 @@ iD.Graph.prototype = { } } - keys = Object.keys(graph.entities); - for (i = 0; i < keys.length; i++) { - id = keys[i]; + for (id in graph.entities) { entity = graph.entities[id]; if (entity && !this.entities.hasOwnProperty(id)) { result.push(id); @@ -219,9 +214,5 @@ iD.Graph.prototype = { if (!entity) result.push(id); }); return result; - }, - - reset: function() { - iD.Graph.prototype.original = {}; } }; diff --git a/js/id/graph/history.js b/js/id/graph/history.js index 5fcb41825..87d637c54 100644 --- a/js/id/graph/history.js +++ b/js/id/graph/history.js @@ -127,7 +127,6 @@ iD.History = function() { }, reset: function () { - iD.Graph.prototype.reset(); stack = [{graph: iD.Graph()}]; index = 0; dispatch.change();