Patch Ember to fix https://github.com/emberjs/ember.js/issues/9805
This commit is contained in:
parent
52f7f8e471
commit
393607d25c
|
@ -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"
|
||||
|
|
|
@ -92,7 +92,7 @@ Discourse.User = Discourse.Model.extend({
|
|||
desc = I18n.t('user.moderator', {user: name});
|
||||
return '<i class="fa fa-shield" title="' + desc + '" alt="' + desc + '"></i>';
|
||||
}
|
||||
return "";
|
||||
return null;
|
||||
}.property('admin','moderator'),
|
||||
|
||||
/**
|
||||
|
|
|
@ -10112,6 +10112,10 @@ enifed("ember-handlebars/string",
|
|||
@return {Handlebars.SafeString} a string that will not be html escaped by Handlebars
|
||||
*/
|
||||
function htmlSafe(str) {
|
||||
if (str === undefined || str === null) {
|
||||
return "";
|
||||
}
|
||||
|
||||
if (typeof str !== 'string') {
|
||||
str = ''+str;
|
||||
}
|
||||
|
|
|
@ -9819,6 +9819,10 @@ enifed("ember-handlebars/string",
|
|||
@return {Handlebars.SafeString} a string that will not be html escaped by Handlebars
|
||||
*/
|
||||
function htmlSafe(str) {
|
||||
if (str === undefined || str === null) {
|
||||
return "";
|
||||
}
|
||||
|
||||
if (typeof str !== 'string') {
|
||||
str = ''+str;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue