diff --git a/app/assets/javascripts/discourse/models/result-set.js.es6 b/app/assets/javascripts/discourse/models/result-set.js.es6 index 527477957a3..5f85ce94177 100644 --- a/app/assets/javascripts/discourse/models/result-set.js.es6 +++ b/app/assets/javascripts/discourse/models/result-set.js.es6 @@ -25,12 +25,9 @@ export default Ember.ArrayProxy.extend({ if (this.get("length") < totalRows && !this.get("loadingMore")) { this.set("loadingMore", true); - const self = this; return this.store .appendResults(this, this.get("__type"), loadMoreUrl) - .finally(function() { - self.set("loadingMore", false); - }); + .finally(() => this.set("loadingMore", false)); } return Ember.RSVP.resolve(); @@ -46,12 +43,9 @@ export default Ember.ArrayProxy.extend({ return; } - const self = this; this.set("refreshing", true); return this.store .refreshResults(this, this.get("__type"), refreshUrl) - .finally(function() { - self.set("refreshing", false); - }); + .finally(() => this.set("refreshing", false)); } }); diff --git a/app/assets/javascripts/discourse/models/store.js.es6 b/app/assets/javascripts/discourse/models/store.js.es6 index a2d53affad8..f5b97f3856b 100644 --- a/app/assets/javascripts/discourse/models/store.js.es6 +++ b/app/assets/javascripts/discourse/models/store.js.es6 @@ -156,7 +156,7 @@ export default Ember.Object.extend({ }, appendResults(resultSet, type, url) { - return ajax(url).then(function(result) { + return ajax(url).then(result => { let typeName = Ember.String.underscore(this.pluralize(type)); let pageTarget = result.meta || result;