From 09b20ffe9464be6f12c3a23682253464811414d7 Mon Sep 17 00:00:00 2001 From: Tom MacWright Date: Fri, 14 Dec 2012 14:41:21 -0500 Subject: [PATCH] Fix inspector for things with no tags --- js/id/ui/inspector.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/js/id/ui/inspector.js b/js/id/ui/inspector.js index ab52a2a62..b8c834cc8 100644 --- a/js/id/ui/inspector.js +++ b/js/id/ui/inspector.js @@ -136,7 +136,9 @@ iD.Inspector = function() { .map(entries); } - draw(d3.entries(_.clone(entity.tags))); + var tags = d3.entries(_.clone(entity.tags)); + if (tags.length === 0) tags = [{ key: '', value: '' }]; + draw(tags); selection.select('input').node().focus();