From 746b54f3d2b12b82c6eccb10c4763d5575ac5973 Mon Sep 17 00:00:00 2001 From: Bryan Housel Date: Tue, 15 Aug 2017 15:34:34 -0400 Subject: [PATCH] Make combo field work without an entity --- modules/ui/fields/combo.js | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/modules/ui/fields/combo.js b/modules/ui/fields/combo.js index 1f61bf0bd..baef52aa0 100644 --- a/modules/ui/fields/combo.js +++ b/modules/ui/fields/combo.js @@ -161,12 +161,17 @@ export function uiFieldCombo(field, context) { query = country + ':'; } - taginfo[fn]({ + var params = { debounce: (q !== ''), key: field.key, - geometry: context.geometry(entity.id), query: query - }, function(err, data) { + }; + + if (entity) { + params.geometry = context.geometry(entity.id); + } + + taginfo[fn](params, function(err, data) { if (err) return; if (hasCountryPrefix) { data = _.filter(data, function(d) {