Going green: do not rely on falsy conditional
This commit is contained in:
parent
6c063095a3
commit
48ad7059e1
@ -589,7 +589,7 @@ Histogram.prototype.format = function(result, override) {
|
||||
nans = firstRow.nans_count;
|
||||
binsStart = populateBinStart(override, firstRow);
|
||||
|
||||
if (timestampStart) {
|
||||
if (Number.isFinite(timestampStart)) {
|
||||
aggregation = getAggregation(override, this.aggregation);
|
||||
offset = getOffset(override, this.offset);
|
||||
}
|
||||
|
@ -949,11 +949,10 @@ describe('histogram-dates: timestamp starts at epoch', function() {
|
||||
this.testClient.getDataview('epoch_start_histogram', override, function(err, dataview) {
|
||||
assert.ifError(err);
|
||||
|
||||
console.log(dataview);
|
||||
const { aggregation, timestamp_start } = dataview;
|
||||
|
||||
assert.equal(timestamp_start, 0);
|
||||
assert.equal(aggregation, 'quarter');
|
||||
assert.equal(aggregation, 'month');
|
||||
|
||||
done();
|
||||
});
|
||||
|
Loading…
Reference in New Issue
Block a user