From 7bf669ccf3ad715a8342385dbe26cf87786bebd6 Mon Sep 17 00:00:00 2001 From: Robin Ward Date: Wed, 3 Dec 2014 12:30:42 -0500 Subject: [PATCH] FIX: Don't show `undefined` in the footer text. --- .../javascripts/discourse/controllers/discovery/topics.js.es6 | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/assets/javascripts/discourse/controllers/discovery/topics.js.es6 b/app/assets/javascripts/discourse/controllers/discovery/topics.js.es6 index f5bea7b6e77..7624c96aba0 100644 --- a/app/assets/javascripts/discourse/controllers/discovery/topics.js.es6 +++ b/app/assets/javascripts/discourse/controllers/discovery/topics.js.es6 @@ -158,11 +158,11 @@ var controllerOpts = { }.property('allLoaded', 'topics.length'), footerEducation: function() { - if (!this.get('allLoaded') || this.get('topics.length') > 0 || !Discourse.User.current()) { return; } + if (!this.get('allLoaded') || this.get('topics.length') > 0 || !Discourse.User.current()) { return ""; } var split = this.get('filter').split('/'); - if (split[0] !== 'new' && split[0] !== 'unread' && split[0] !== 'starred') { return; } + if (split[0] !== 'new' && split[0] !== 'unread' && split[0] !== 'starred') { return ""; } return I18n.t("topics.none.educate." + split[0], { userPrefsUrl: Discourse.getURL("/users/") + (Discourse.User.currentProp("username_lower")) + "/preferences"