Fix for deleting elements

This commit is contained in:
Tom MacWright
2013-01-08 16:52:00 -05:00
parent 11232c080f
commit 2079918e8f

View File

@@ -78,7 +78,7 @@ iD.Map = function() {
var only = {};
difference.forEach(function buildDifference(id) {
only[id] = graph.fetch(id);
if (only[id].type === 'node') {
if (only[id] && only[id].type === 'node') {
graph.parentWays(id).forEach(function buildOnly(parent) {
// Don't re-fetch parents
if (only[parent.id] === undefined) {