Browse Source

use ES6 arrow function instead of self var on getAggregators

godfreyhe 10 years ago
parent
commit
7810413699
1 changed files with 2 additions and 3 deletions
  1. 2 3
      public/app/plugins/datasource/opentsdb/query_ctrl.ts

+ 2 - 3
public/app/plugins/datasource/opentsdb/query_ctrl.ts

@@ -38,9 +38,8 @@ export class OpenTsQueryCtrl extends QueryCtrl {
       this.target.downsampleFillPolicy = 'none';
       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
     // needs to be defined here as it is called from typeahead