FIX: Don't show `undefined` in the footer text.

This commit is contained in:
Robin Ward 2014-12-03 12:30:42 -05:00
parent 5f3ac2a0cb
commit 7bf669ccf3
1 changed files with 2 additions and 2 deletions

View File

@ -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"