diff --git a/lib/cartodb/models/dataview/histogram.js b/lib/cartodb/models/dataview/histogram.js index 98d59214..a1e08494 100644 --- a/lib/cartodb/models/dataview/histogram.js +++ b/lib/cartodb/models/dataview/histogram.js @@ -465,11 +465,14 @@ module.exports = class Histogram extends BaseWidget { } _shouldOverride (override) { - return override && _.has(override, 'start') && _.has(override, 'end') && _.has(override, 'bins'); + return override && + override.hasOwnProperty('start') && + override.hasOwnProperty('end') && + override.hasOwnProperty('bins'); } _shouldOverrideBins (override) { - return override && _.has(override, 'bins'); + return override && override.hasOwnProperty('bins'); } _buildDateHistogramQuery (psql, override, callback) { @@ -499,7 +502,7 @@ module.exports = class Histogram extends BaseWidget { var dateBasicsQuery; - if (override && _.has(override, 'start') && _.has(override, 'end')) { + if (override && override.hasOwnProperty('start') && override.hasOwnProperty('end')) { dateBasicsQuery = dateOverrideBasicsQueryTpl({ _query: _query, _column: _column, @@ -731,4 +734,4 @@ module.exports = class Histogram extends BaseWidget { var offsetInHours = Math.ceil(offset / 3600); return '' + offsetInHours; } -} +};