From 9fdea6cd46a4c31521c4d4e41c43d5ecf6b86c37 Mon Sep 17 00:00:00 2001 From: Robin Ward Date: Tue, 26 Apr 2016 17:54:52 -0400 Subject: [PATCH] FIX: Broken similar topics --- .../javascripts/discourse/widgets/search-menu-results.js.es6 | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/app/assets/javascripts/discourse/widgets/search-menu-results.js.es6 b/app/assets/javascripts/discourse/widgets/search-menu-results.js.es6 index 5d6e03a82c0..d057d196e5c 100644 --- a/app/assets/javascripts/discourse/widgets/search-menu-results.js.es6 +++ b/app/assets/javascripts/discourse/widgets/search-menu-results.js.es6 @@ -12,7 +12,9 @@ class Highlighted extends RawHtml { } decorate($html) { - $html.highlight(this.term.split(/\s+/), { className: 'search-highlight' }); + if (this.term) { + $html.highlight(this.term.split(/\s+/), { className: 'search-highlight' }); + } } }