From 4e3217e0f47093bef16822c54f2292fb077c30ed Mon Sep 17 00:00:00 2001 From: Stephen Boissiere Date: Sat, 27 May 2017 15:58:18 +0100 Subject: [PATCH] Add hard coded integer constants for *_SAFE_INTEGER which are not available on IE --- src/scales/scale.time.js | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/scales/scale.time.js b/src/scales/scale.time.js index 0b356b3c100..cde117ceb56 100644 --- a/src/scales/scale.time.js +++ b/src/scales/scale.time.js @@ -232,8 +232,9 @@ module.exports = function(Chart) { var timeOpts = me.options.time; // We store the data range as unix millisecond timestamps so dataMin and dataMax will always be integers. - var dataMin = Number.MAX_SAFE_INTEGER; - var dataMax = Number.MIN_SAFE_INTEGER; + // Integer constants are from the ES6 spec. + var dataMin = Number.MAX_SAFE_INTEGER || 9007199254740991; + var dataMax = Number.MIN_SAFE_INTEGER || -9007199254740991; var chartData = me.chart.data; var parsedData = {