From: Tanner Linsley Date: Mon, 28 Sep 2015 17:27:47 +0000 (-0600) Subject: Time Scale now requires and warns for Moment.js dep X-Git-Tag: 2.0.0-alpha4~10 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=1bdf5edc2421bdbb8cf64da1771e7108f80919d1;p=thirdparty%2FChart.js.git Time Scale now requires and warns for Moment.js dep --- diff --git a/src/scales/scale.time.js b/src/scales/scale.time.js index 58984b3c4..e885b9ee9 100644 --- a/src/scales/scale.time.js +++ b/src/scales/scale.time.js @@ -1,6 +1,11 @@ (function() { "use strict"; + if (!window.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; + } + var root = this, Chart = root.Chart, helpers = Chart.helpers;