From ff52ba1699cefccb99dc729ad65b89b8f46aef45 Mon Sep 17 00:00:00 2001 From: jgould Date: Tue, 19 Apr 2016 11:00:14 -0400 Subject: [PATCH] check for null field in autocomplete --- src/matrix/dataset_util.js | 22 ++++++++++++---------- 1 file changed, 12 insertions(+), 10 deletions(-) diff --git a/src/matrix/dataset_util.js b/src/matrix/dataset_util.js index f420ae0..6c15c1a 100644 --- a/src/matrix/dataset_util.js +++ b/src/matrix/dataset_util.js @@ -635,16 +635,18 @@ morpheus.DatasetUtil.autocompleteValues = function(dataset) { }); }); - fields.forEach(function(field) { - if (regex.test(field)) { - matches.push({ - value : field + ':', - label : '' + field - + ':', - show : true - }); - } - }); + if (field == null) { + fields.forEach(function(field) { + if (regex.test(field)) { + matches.push({ + value : field + ':', + label : '' + field + + ':', + show : true + }); + } + }); + } cb(matches); }; -- GitLab