]> git.ipfire.org Git - thirdparty/Chart.js.git/commitdiff
Time scale uses moment loaded through UMD
authoretimberg <evert.timberg@gmail.com>
Thu, 3 Dec 2015 02:10:51 +0000 (21:10 -0500)
committeretimberg <evert.timberg@gmail.com>
Thu, 3 Dec 2015 02:10:51 +0000 (21:10 -0500)
src/scales/scale.time.js

index ad8fee7d4ffbbbba43e14f43374162ef53778b3b..ea63feed2933239c83d633b5f7804e707173da74 100644 (file)
@@ -1,7 +1,7 @@
-(function() {
+(function(moment) {
        "use strict";
 
-       if (!window.moment) {
+       if (!moment) {
                console.warn('Chart.js - Moment.js could not be found! You must include it before Chart.js to use the time scale. Download at http://momentjs.com/');
                return;
        }
        });
        Chart.scaleService.registerScaleType("time", TimeScale, defaultConfig);
 
-}).call(this);
+}).call(this, moment);