From 6175973fda49651303254e400441aa7ad2dbda33 Mon Sep 17 00:00:00 2001 From: Sam Date: Thu, 4 Dec 2014 09:32:02 +1100 Subject: [PATCH] Revert "Patch Ember to fix https://github.com/emberjs/ember.js/issues/9805" This reverts commit 393607d25c43cb022962a002599e08cfbf0eb4e4. --- .../javascripts/discourse/controllers/discovery/topics.js.es6 | 4 ++-- app/assets/javascripts/discourse/models/user.js | 2 +- vendor/assets/javascripts/development/ember.js | 4 ---- vendor/assets/javascripts/production/ember.js | 4 ---- 4 files changed, 3 insertions(+), 11 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" diff --git a/app/assets/javascripts/discourse/models/user.js b/app/assets/javascripts/discourse/models/user.js index 47e36a415e4..ab29c600a6f 100644 --- a/app/assets/javascripts/discourse/models/user.js +++ b/app/assets/javascripts/discourse/models/user.js @@ -92,7 +92,7 @@ Discourse.User = Discourse.Model.extend({ desc = I18n.t('user.moderator', {user: name}); return ''; } - return null; + return ""; }.property('admin','moderator'), /** diff --git a/vendor/assets/javascripts/development/ember.js b/vendor/assets/javascripts/development/ember.js index e8b57d0adc7..9e52da89de3 100644 --- a/vendor/assets/javascripts/development/ember.js +++ b/vendor/assets/javascripts/development/ember.js @@ -10112,10 +10112,6 @@ 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; } diff --git a/vendor/assets/javascripts/production/ember.js b/vendor/assets/javascripts/production/ember.js index 91d071be02d..d036d87d4ec 100644 --- a/vendor/assets/javascripts/production/ember.js +++ b/vendor/assets/javascripts/production/ember.js @@ -9819,10 +9819,6 @@ 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; }