From bd38a19fedafae04273fc4b8cb789ec69eaaadd9 Mon Sep 17 00:00:00 2001 From: Ansis Brammanis Date: Thu, 25 Apr 2013 15:35:38 -0400 Subject: [PATCH] avoid trying to modify frozen tag object fixes #1380 --- js/id/ui/tag_editor.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/js/id/ui/tag_editor.js b/js/id/ui/tag_editor.js index 4ba5efb68..df3c22c46 100644 --- a/js/id/ui/tag_editor.js +++ b/js/id/ui/tag_editor.js @@ -2,7 +2,7 @@ iD.ui.TagEditor = function(context, entity) { var event = d3.dispatch('changeTags', 'choose', 'close'), presets = context.presets(), id = entity.id, - tags = entity.tags, + tags = _.clone(entity.tags), preset, selection_, presetUI, @@ -12,7 +12,7 @@ iD.ui.TagEditor = function(context, entity) { var entity = context.hasEntity(id); if (!entity) return; - tags = entity.tags; + tags = _.clone(entity.tags); // change preset if necessary (undos/redos) var newmatch = presets.match(entity, context.graph());