REFACTOR: Remove a couple more `self` uses
This commit is contained in:
parent
dca5486b78
commit
bb8808985a
|
@ -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));
|
||||
}
|
||||
});
|
||||
|
|
|
@ -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;
|
||||
|
|
Loading…
Reference in New Issue