remove 'self' with arrows functions

This commit is contained in:
Simon Martín 2018-07-30 16:44:30 +02:00
parent 898bac5b04
commit 384f4f74e0

View File

@ -24,9 +24,8 @@ function getEstimatedRows(pgQueryRunner, username, query, callback) {
FilterStatsBackends.prototype.getFilterStats = function (username, unfiltered_query, filters, callback) {
var stats = {};
var self = this;
getEstimatedRows(self.pgQueryRunner, username, unfiltered_query, function (err, rows) {
getEstimatedRows(this.pgQueryRunner, username, unfiltered_query, (err, rows) => {
if (err){
return callback(err);
}
@ -37,7 +36,7 @@ FilterStatsBackends.prototype.getFilterStats = function (username, unfiltered_qu
var analysisFilter = new AnalysisFilter(filters);
var query = analysisFilter.sql(unfiltered_query);
getEstimatedRows(self.pgQueryRunner, username, query, function (err, rows) {
getEstimatedRows(this.pgQueryRunner, username, query, (err, rows) => {
if (err){
return callback(err);
}