From e097641f4e475d2029deb1978a453da96c5e7de4 Mon Sep 17 00:00:00 2001 From: Ansis Brammanis Date: Tue, 2 Apr 2013 16:43:53 -0400 Subject: [PATCH] Fix deleting entity with modified field fixes #1237 --- js/id/ui/inspector.js | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/js/id/ui/inspector.js b/js/id/ui/inspector.js index 777b4d486..7080cd428 100644 --- a/js/id/ui/inspector.js +++ b/js/id/ui/inspector.js @@ -1,8 +1,9 @@ iD.ui.Inspector = function(context, entity) { - var tagEditor; + var tagEditor, + id = entity.id; function changeTags(tags) { - entity = context.entity(entity.id); + var entity = context.entity(id); if (entity && !_.isEqual(entity.tags, tags)) { context.perform( iD.actions.ChangeTags(entity.id, tags), @@ -15,7 +16,7 @@ iD.ui.Inspector = function(context, entity) { } function update() { - entity = context.entity(entity.id); + var entity = context.entity(id); if (entity) { tagEditor.tags(entity.tags); }