Skip to content

Commit

Permalink
FIX: JS error when showing topic search results (#14551)
Browse files Browse the repository at this point in the history
  • Loading branch information
pmusaraj committed Oct 7, 2021
1 parent 9f3b82e commit aa00960
Showing 1 changed file with 3 additions and 1 deletion.
Expand Up @@ -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) {
Expand Down

2 comments on commit aa00960

@fishfree
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I run discourse with https://github.com/discourse/discourse_docker, I login into the container and edited this file, but not working. What should I do?

@eviltrout
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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

Please sign in to comment.