Use hasOwnProperty method to check if histogram is a time-series

This commit is contained in:
Daniel García Aubert
2017-09-12 10:38:53 +02:00
parent 8f797c3c41
commit c0cfdad7d1
2 changed files with 2 additions and 2 deletions

View File

@@ -42,7 +42,7 @@ module.exports = class Histogram {
}
_isDateHistogram (override = {}) {
return (this.options.aggregation !== undefined || override.aggregation !== undefined);
return (this.options.hasOwnProperty('aggregation') || override.hasOwnProperty('aggregation'));
}
getResult (psql, override, callback) {

View File

@@ -64,7 +64,7 @@ const binsQueryTpl = ctx => `
${ctx._maxBins}
)
)
END AS __cdb_bins_number
END AS __cdb_bins_number
FROM __cdb_basics, __cdb_iqrange, __cdb_filtered_source
LIMIT 1
)