Commit 78104136 by godfreyhe

use ES6 arrow function instead of self var on getAggregators

parent 8e7a1277
...@@ -38,9 +38,8 @@ export class OpenTsQueryCtrl extends QueryCtrl { ...@@ -38,9 +38,8 @@ export class OpenTsQueryCtrl extends QueryCtrl {
this.target.downsampleFillPolicy = 'none'; this.target.downsampleFillPolicy = 'none';
} }
var self = this; this.datasource.getAggregators().then((aggs) => {
this.datasource.getAggregators().then(function(aggs) { this.aggregators = aggs;
self.aggregators = aggs;
}); });
// needs to be defined here as it is called from typeahead // needs to be defined here as it is called from typeahead
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment