From 274d9df95da4b1af7f4d9f446a4c7707086dfd43 Mon Sep 17 00:00:00 2001 From: Bryan Housel Date: Mon, 28 Sep 2015 17:02:54 -0400 Subject: [PATCH] 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) --- js/id/ui/preset_list.js | 2 ++ 1 file changed, 2 insertions(+) diff --git a/js/id/ui/preset_list.js b/js/id/ui/preset_list.js index 150248211..d244a0530 100644 --- a/js/id/ui/preset_list.js +++ b/js/id/ui/preset_list.js @@ -154,6 +154,8 @@ iD.ui.PresetList = function(context) { } item.choose = function() { + if (!box || !sublist) return; + if (shown) { shown = false; box.transition()