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)
This commit is contained in:
Bryan Housel
2015-12-21 15:09:44 -05:00
parent 4bcbb6cbad
commit 46ac91ad06

View File

@@ -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]);
}
}