diff --git a/js/id/graph/graph.js b/js/id/graph/graph.js index 6786e0f7e..519dc9d29 100644 --- a/js/id/graph/graph.js +++ b/js/id/graph/graph.js @@ -107,19 +107,21 @@ iD.Graph.prototype = { }, difference: function (graph) { - var result = []; + var result = [], entity, id; - _.each(this.entities, function(entity, id) { + for (id in this.entities) { + entity = this.entities[id]; if (entity !== graph.entities[id]) { result.push(id); } - }); + } - _.each(graph.entities, function(entity, id) { + for (id in graph.entities) { + entity = graph.entities[id]; if (entity && !this.entities.hasOwnProperty(id)) { result.push(id); } - }, this); + } return result.sort(); },