diff --git a/app/assets/javascripts/discourse/widgets/search-menu.js.es6 b/app/assets/javascripts/discourse/widgets/search-menu.js.es6 index ad27f7ea0..69631028a 100644 --- a/app/assets/javascripts/discourse/widgets/search-menu.js.es6 +++ b/app/assets/javascripts/discourse/widgets/search-menu.js.es6 @@ -97,14 +97,15 @@ export default createWidget('search-menu', { const results = [this.attach('search-term', { value: searchData.term, contextEnabled }), this.attach('search-context', { contextEnabled })]; - if (searchData.term) - if (searchData.loading) { - results.push(h('div.searching', h('div.spinner'))); - } else { - results.push(this.attach('search-menu-results', { term: searchData.term, - noResults: searchData.noResults, - results: searchData.results, - invalidTerm: searchData.invalidTerm })); + if (searchData.term) { + if (searchData.loading) { + results.push(h('div.searching', h('div.spinner'))); + } else { + results.push(this.attach('search-menu-results', { term: searchData.term, + noResults: searchData.noResults, + results: searchData.results, + invalidTerm: searchData.invalidTerm })); + } } return results;