FIX: JS error when showing topic search results (#14551)

FIX: JS error when showing topic search results (#14551)

diff --git a/app/assets/javascripts/discourse/app/widgets/search-menu-results.js b/app/assets/javascripts/discourse/app/widgets/search-menu-results.js
index cf435b7..fda5656 100644
--- a/app/assets/javascripts/discourse/app/widgets/search-menu-results.js
+++ b/app/assets/javascripts/discourse/app/widgets/search-menu-results.js
@@ -61,7 +61,9 @@ export function addSearchSuggestion(value) {
 class Highlighted extends RawHtml {
   constructor(html, term) {
     super({ html: `<span>${html}</span>` });
-    this.term = term.replace(TOPIC_REPLACE_REGEXP, "");
+    if (term) {
+      this.term = term.replace(TOPIC_REPLACE_REGEXP, "");
+    }
   }
 
   decorate($html) {

GitHub sha: aa00960638bf6a67836ac838ffac17a539c942b9

This commit appears in #14551 which was approved by CvX. It was merged by pmusaraj.

I run discourse with GitHub - discourse/discourse_docker: A Docker image for Discourse, I login into the container and edited this file, but not working. What should I do?

@fishfree update your discourse and you should get this fix automatically.