From aef17c1968fe57d35dae66c35849408aa11b32e2 Mon Sep 17 00:00:00 2001 From: John Firebaugh Date: Fri, 22 Mar 2013 11:23:23 -0700 Subject: [PATCH] Fix duplicate undo entries (fixes #1105) --- js/id/ui/inspector.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/js/id/ui/inspector.js b/js/id/ui/inspector.js index cef84ca75..de2ed33ae 100644 --- a/js/id/ui/inspector.js +++ b/js/id/ui/inspector.js @@ -2,7 +2,8 @@ iD.ui.Inspector = function(context, entity) { var tagEditor; function changeTags(tags) { - if (!_.isEqual(entity.tags, tags)) { + entity = context.entity(entity.id); + if (entity && !_.isEqual(entity.tags, tags)) { context.perform( iD.actions.ChangeTags(entity.id, tags), t('operations.change_tags.annotation'));