diff --git a/app/assets/javascripts/discourse/components/topic-status.js.es6 b/app/assets/javascripts/discourse/components/topic-status.js.es6 index 5afba3db76d..bede7d57a6a 100644 --- a/app/assets/javascripts/discourse/components/topic-status.js.es6 +++ b/app/assets/javascripts/discourse/components/topic-status.js.es6 @@ -27,8 +27,6 @@ export default Ember.Component.extend(bufferedRender({ }.property('disableActions'), buildBuffer(buffer) { - const self = this; - const renderIcon = function(name, key, actionable) { const title = escapeExpression(I18n.t(`topic_statuses.${key}.help`)), startTag = actionable ? "a href" : "span", @@ -39,8 +37,8 @@ export default Ember.Component.extend(bufferedRender({ buffer.push(`<${startTag} title='${title}' class='topic-status'>${icon}`); }; - const renderIconIf = function(conditionProp, name, key, actionable) { - if (!self.get(conditionProp)) { return; } + const renderIconIf = (conditionProp, name, key, actionable) => { + if (!this.get(conditionProp)) { return; } renderIcon(name, key, actionable); }; diff --git a/app/assets/javascripts/discourse/controllers/discovery/categories.js.es6 b/app/assets/javascripts/discourse/controllers/discovery/categories.js.es6 index 5b435b8d9ac..19d6ae6b800 100644 --- a/app/assets/javascripts/discourse/controllers/discovery/categories.js.es6 +++ b/app/assets/javascripts/discourse/controllers/discovery/categories.js.es6 @@ -12,7 +12,7 @@ export default DiscoveryController.extend({ return Discourse.User.currentProp('staff'); }, - @computed("model.categories.@each.featuredTopics.length") + @computed("model.categories.[].featuredTopics.length") latestTopicOnly() { return this.get("model.categories").find(c => c.get("featuredTopics.length") > 1) === undefined; }, diff --git a/app/assets/javascripts/discourse/controllers/preferences.js.es6 b/app/assets/javascripts/discourse/controllers/preferences.js.es6 index 4e963365633..5ee945d4da2 100644 --- a/app/assets/javascripts/discourse/controllers/preferences.js.es6 +++ b/app/assets/javascripts/discourse/controllers/preferences.js.es6 @@ -157,9 +157,7 @@ export default Ember.Controller.extend(CanCheckEmails, { // Cook the bio for preview model.set('name', this.get('newNameInput')); - var options = {}; - - return model.save(options).then(() => { + return model.save().then(() => { if (Discourse.User.currentProp('id') === model.get('id')) { Discourse.User.currentProp('name', model.get('name')); }