From 4fe2f1de519933d15e864efb647611f90b77d4d2 Mon Sep 17 00:00:00 2001 From: Jen Huang Date: Fri, 2 Nov 2018 16:43:56 -0700 Subject: [PATCH] [Rollups] Fix invalid date histogram interval warning (#25066) * Fix invalid date histogram interval warning * Remove erroneous line --- src/ui/public/time_buckets/time_buckets.js | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/ui/public/time_buckets/time_buckets.js b/src/ui/public/time_buckets/time_buckets.js index 0da2fc868c977..a828b856b1dbd 100644 --- a/src/ui/public/time_buckets/time_buckets.js +++ b/src/ui/public/time_buckets/time_buckets.js @@ -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() {