From 57493016b6ca60a737220bcfd5d1ca2662c8562b Mon Sep 17 00:00:00 2001 From: Tom MacWright Date: Thu, 7 Feb 2013 17:17:24 -0500 Subject: [PATCH] Remove ref to 404 test, do not discard tags from empty tags --- js/id/graph/history.js | 10 +++++++--- test/index.html | 1 - 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/js/id/graph/history.js b/js/id/graph/history.js index 04d52f6ab..5f648b434 100644 --- a/js/id/graph/history.js +++ b/js/id/graph/history.js @@ -134,9 +134,13 @@ iD.History = function(context) { var difference = history.difference(); function discardTags(entity) { - return entity.update({ - tags: _.omit(entity.tags, iD.data.discarded) - }); + if (_.isEmpty(entity.tags)) { + return entity; + } else { + return entity.update({ + tags: _.omit(entity.tags, iD.data.discarded) + }); + } } return { diff --git a/test/index.html b/test/index.html index 7f5d2a878..8fb7da652 100644 --- a/test/index.html +++ b/test/index.html @@ -159,7 +159,6 @@ -