FIX: ensures censor has always at least an empty string to handle (#8442)

FIX: ensures censor has always at least an empty string to handle (#8442)

diff --git a/app/assets/javascripts/discourse/models/topic.js.es6 b/app/assets/javascripts/discourse/models/topic.js.es6
index 94b778f65d..d95f8334b8 100644
--- a/app/assets/javascripts/discourse/models/topic.js.es6
+++ b/app/assets/javascripts/discourse/models/topic.js.es6
@@ -110,7 +110,7 @@ const Topic = RestModel.extend({
   @discourseComputed("fancy_title")
   fancyTitle(title) {
     let fancyTitle = censor(
-      emojiUnescape(title || ""),
+      emojiUnescape(title) || "",
       Site.currentProp("censored_regexp")
     );

GitHub sha: 3cf4ba50

1 Like