From 1bdf5edc2421bdbb8cf64da1771e7108f80919d1 Mon Sep 17 00:00:00 2001 From: Tanner Linsley Date: Mon, 28 Sep 2015 11:27:47 -0600 Subject: [PATCH] Time Scale now requires and warns for Moment.js dep --- src/scales/scale.time.js | 5 +++++ 1 file changed, 5 insertions(+) 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;