diff --git a/x-pack/plugins/code/public/components/search_page/search.tsx b/x-pack/plugins/code/public/components/search_page/search.tsx index dbc9a86f64b99..eaf08c7201d6f 100644 --- a/x-pack/plugins/code/public/components/search_page/search.tsx +++ b/x-pack/plugins/code/public/components/search_page/search.tsx @@ -177,32 +177,30 @@ class SearchPage extends React.PureComponent {
{resultComps}
); - } else if ( - scope === SearchScope.DEFAULT && - documentSearchResults && - (documentSearchResults.total > 0 || languages!.size > 0 || repositories!.size > 0) - ) { + } else if (scope === SearchScope.DEFAULT && documentSearchResults) { const { stats, results } = documentSearchResults!; const { total, from, to, page, totalPage } = stats!; languageStats = stats!.languageStats; repoStats = stats!.repoStats; - const statsComp = ( - -

- Showing {total > 0 ? from : 0} - {to} of {total} results. -

-
- ); - mainComp = ( -
- {statsComp} - -
- + if (documentSearchResults.total > 0) { + const statsComp = ( + +

+ Showing {total > 0 ? from : 0} - {to} of {total} results. +

+
+ ); + mainComp = ( +
+ {statsComp} + +
+ +
+
- -
- ); + ); + } } return (