From 03babcb43b397d2ffedf811af506074a4263d916 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Daniel=20Garc=C3=ADa=20Aubert?= Date: Mon, 11 Sep 2017 19:31:38 +0200 Subject: [PATCH] Simplify condition and remove unused method --- lib/cartodb/models/dataview/histograms/numeric-histogram.js | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/lib/cartodb/models/dataview/histograms/numeric-histogram.js b/lib/cartodb/models/dataview/histograms/numeric-histogram.js index fb158dc0..7a562ec7 100644 --- a/lib/cartodb/models/dataview/histograms/numeric-histogram.js +++ b/lib/cartodb/models/dataview/histograms/numeric-histogram.js @@ -186,7 +186,7 @@ module.exports = class NumericHistogram extends BaseHistogram { return ` WITH ${filteredQueryTpl(ctx)}, - ${this._shouldOverride(ctx._override) ? overrideBasicsQueryTpl(ctx) : basicsQueryTpl(ctx)}, + ${this._shouldOverrideRange(ctx._override) ? overrideBasicsQueryTpl(ctx) : basicsQueryTpl(ctx)}, ${this._shouldOverrideBins(ctx._override) ? overrideBinsQueryTpl(ctx) : `${iqrQueryTpl(ctx)}, ${binsQueryTpl(ctx)}` @@ -197,10 +197,6 @@ module.exports = class NumericHistogram extends BaseHistogram { `; } - _shouldOverride (override) { - return this._shouldOverrideRange(override) && this._shouldOverrideBins(override); - } - _shouldOverrideRange (override) { return override && override.hasOwnProperty('start') && override.hasOwnProperty('end'); }