use ES6 arrow function instead of self var on getAggregators

This commit is contained in:
godfreyhe
2016-02-28 11:48:54 +08:00
parent 8e7a127792
commit 7810413699
@@ -38,9 +38,8 @@ export class OpenTsQueryCtrl extends QueryCtrl {
this.target.downsampleFillPolicy = 'none';
}
var self = this;
this.datasource.getAggregators().then(function(aggs) {
self.aggregators = aggs;
this.datasource.getAggregators().then((aggs) => {
this.aggregators = aggs;
});
// needs to be defined here as it is called from typeahead