|
@@ -1023,18 +1023,16 @@ from desktop.views import _ko
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
- if (values.length > 0) {
|
|
|
|
|
- values.push({ divider: true });
|
|
|
|
|
- }
|
|
|
|
|
- if (typeof data.results !== 'undefined') {
|
|
|
|
|
|
|
+
|
|
|
|
|
+ if (!facetMatch && typeof data.results !== 'undefined' && data.results.length > 0) {
|
|
|
|
|
+ if (values.length > 0) {
|
|
|
|
|
+ values.push({ divider: true });
|
|
|
|
|
+ }
|
|
|
data.results.forEach(function (result) {
|
|
data.results.forEach(function (result) {
|
|
|
values.push({ data: { label: result.hue_name, icon: SEARCH_TYPE_ICONS[result.type], description: result.hue_description }, value: beforePartial + result.originalName });
|
|
values.push({ data: { label: result.hue_name, icon: SEARCH_TYPE_ICONS[result.type], description: result.hue_description }, value: beforePartial + result.originalName });
|
|
|
});
|
|
});
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
- if (values.length > 0 && values[values.length - 1].divider) {
|
|
|
|
|
- values.pop();
|
|
|
|
|
- }
|
|
|
|
|
if (values.length === 0) {
|
|
if (values.length === 0) {
|
|
|
values.push({ noMatch: true });
|
|
values.push({ noMatch: true });
|
|
|
}
|
|
}
|