From 46ac91ad060033ff4ece42d14a9b526f2b975df2 Mon Sep 17 00:00:00 2001 From: Bryan Housel Date: Mon, 21 Dec 2015 15:09:44 -0500 Subject: [PATCH] Fail gracefully when singular selected item disappears (This was causing a crash in the walkthrough if the user failed to connect Flower Street and the walkthrough removed the new way and restarted the task) --- js/id/modes/select.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/js/id/modes/select.js b/js/id/modes/select.js index f016f5b92..bef505e0a 100644 --- a/js/id/modes/select.js +++ b/js/id/modes/select.js @@ -27,7 +27,7 @@ iD.modes.Select = function(context, selectedIDs) { function singular() { if (selectedIDs.length === 1) { - return context.entity(selectedIDs[0]); + return context.hasEntity(selectedIDs[0]); } }