Skip to content

Commit

Permalink
[Rollups] Fix invalid date histogram interval warning (elastic#25066)
Browse files Browse the repository at this point in the history
* Fix invalid date histogram interval warning

* Remove erroneous line
  • Loading branch information
jen-huang committed Nov 2, 2018
1 parent 2d465b6 commit 5225d0b
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion src/ui/public/time_buckets/time_buckets.js
Original file line number Diff line number Diff line change
Expand Up @@ -225,7 +225,13 @@ TimeBuckets.prototype.setInterval = function (input) {
TimeBuckets.prototype.getInterval = function (useNormalizedEsInterval = true) {
const self = this;
const duration = self.getDuration();
return decorateInterval(maybeScaleInterval(readInterval()));
const parsedInterval = readInterval();

if(useNormalizedEsInterval) {
return decorateInterval(maybeScaleInterval(parsedInterval));
} else {
return decorateInterval(parsedInterval);
}

// either pull the interval from state or calculate the auto-interval
function readInterval() {
Expand Down

0 comments on commit 5225d0b

Please sign in to comment.