FIX: short description title on client side when empty description

FIX: short description title on client side when empty description

follow-up 77af097c

diff --git a/app/assets/javascripts/discourse/routes/application.js.es6 b/app/assets/javascripts/discourse/routes/application.js.es6
index 1bafd2d..5d458c5 100644
--- a/app/assets/javascripts/discourse/routes/application.js.es6
+++ b/app/assets/javascripts/discourse/routes/application.js.es6
@@ -42,7 +42,10 @@ const ApplicationRoute = Discourse.Route.extend(OpenComposer, {
 
     _collectTitleTokens(tokens) {
       tokens.push(this.get("siteTitle"));
-      if (window.location.pathname === Discourse.getURL("/")) {
+      if (
+        window.location.pathname === Discourse.getURL("/") &&
+        this.get("shortSiteDescription") !== ""
+      ) {
         tokens.push(this.get("shortSiteDescription"));
       }
       Discourse.set("_docTitle", tokens.join(" - "));

GitHub sha: 24ca074f

2 Likes