FIX: Don't show `undefined` in the footer text.
This commit is contained in:
parent
5f3ac2a0cb
commit
7bf669ccf3
|
@ -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"
|
||||
|
|
Loading…
Reference in New Issue