]> git.ipfire.org Git - thirdparty/Chart.js.git/commitdiff
Add hard coded integer constants for *_SAFE_INTEGER which are not available on IE
authorStephen Boissiere <Stephen.Boissiere@gmail.com>
Sat, 27 May 2017 14:58:18 +0000 (15:58 +0100)
committerEvert Timberg <evert.timberg+github@gmail.com>
Sat, 27 May 2017 15:56:17 +0000 (11:56 -0400)
src/scales/scale.time.js

index 1d726e1b35997c5382e95f264bcd1102349bc3cc..f99452eef775858a45bee1ed7f9a5e6a06cd0f33 100644 (file)
@@ -52,8 +52,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 = {