FIX: Don't append `.no-results` if there's nothing to display

This commit is contained in:
Robin Ward 2017-09-12 11:19:17 -04:00
parent bc613e1df5
commit c097fbbdff
1 changed files with 6 additions and 2 deletions

View File

@ -130,15 +130,19 @@ createWidget('search-menu-results', {
className: "filter filter-type"})));
}
return [
let resultNode = [
h('ul', this.attach(rt.componentName, {
searchContextEnabled: attrs.searchContextEnabled,
searchLogId: attrs.results.grouped_search_result.search_log_id,
results: rt.results,
term: attrs.term
})),
h('div.no-results', more)
];
if (more.length) {
resultNode.push(h('div.no-results', more));
}
return resultNode;
});
}
});