From 1e6a2594d376df58c06a5824927215d76458be00 Mon Sep 17 00:00:00 2001 From: Quincy Morgan Date: Wed, 20 Mar 2019 14:18:57 -0400 Subject: [PATCH] Fix crash on selecting relation preset --- modules/ui/modes.js | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/modules/ui/modes.js b/modules/ui/modes.js index 2eaef7981..2e112514a 100644 --- a/modules/ui/modes.js +++ b/modules/ui/modes.js @@ -87,7 +87,10 @@ export function uiModes(context) { var favoritesCount = items.length; if (favoritesCount < 10) { - items = _uniqWith(items.concat(context.presets().getRecents()), function(item1, item2) { + var recents = context.presets().getRecents().filter(function(recent) { + return recent.geometry !== 'relation'; + }); + items = _uniqWith(items.concat(), function(item1, item2) { return item1.matches(item2.preset, item2.geometry); }); var maxShown = 10;