From b09b43f6d35f7b374aeb7fd5d0b733fb7637ff04 Mon Sep 17 00:00:00 2001 From: Bryan Housel Date: Sun, 19 May 2019 21:37:09 -0400 Subject: [PATCH] Trim the user's string when preset searching (closes #6383) --- modules/presets/collection.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/presets/collection.js b/modules/presets/collection.js index d2ab15d98..82429c1cb 100644 --- a/modules/presets/collection.js +++ b/modules/presets/collection.js @@ -44,7 +44,7 @@ export function presetCollection(collection) { search: function(value, geometry, countryCode) { if (!value) return this; - value = value.toLowerCase(); + value = value.toLowerCase().trim(); // match at name beginning or just after a space (e.g. "office" -> match "Law Office") function leading(a) {