From 222cfb90fdbc949160656b7a75dde1e44f5250c7 Mon Sep 17 00:00:00 2001 From: Simon Date: Mon, 18 Sep 2017 12:20:59 +0200 Subject: [PATCH] Removing 'self' vars using arrow functions --- lib/cartodb/models/dataview/formula.js | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/lib/cartodb/models/dataview/formula.js b/lib/cartodb/models/dataview/formula.js index c0829fa5..daaeaf0c 100644 --- a/lib/cartodb/models/dataview/formula.js +++ b/lib/cartodb/models/dataview/formula.js @@ -78,8 +78,6 @@ module.exports = class Formula extends BaseDataview { sql (psql, override, callback) { - const self = this; - if (!callback) { callback = override; override = {}; @@ -87,11 +85,11 @@ module.exports = class Formula extends BaseDataview { if (this._isFloatColumn === null) { this._isFloatColumn = false; - this.getColumnType(psql, this.column, this.queries.no_filters, function (err, type) { + this.getColumnType(psql, this.column, this.queries.no_filters, (err, type) => { if (!err && !!type) { - self._isFloatColumn = type.float; + this._isFloatColumn = type.float; } - self.sql(psql, override, callback); + this.sql(psql, override, callback); }); return null; }