Fix crash when selecting a category preset with enter button

(this happens because the datum() is a constructor not a constructed object, and
category presets have state, so calling datum().choose from keypress doesn't work)
This commit is contained in:
Bryan Housel
2015-09-28 17:02:54 -04:00
parent 7aecdda913
commit 274d9df95d

View File

@@ -154,6 +154,8 @@ iD.ui.PresetList = function(context) {
}
item.choose = function() {
if (!box || !sublist) return;
if (shown) {
shown = false;
box.transition()