From 95a172df060fcd082530182ac03cc693d45780eb Mon Sep 17 00:00:00 2001 From: etimberg Date: Wed, 2 Dec 2015 22:15:03 -0500 Subject: [PATCH] Remove old and stuff. Use the correct color variable instead of window.color --- src/core/core.helpers.js | 9 +++++---- src/core/core.js | 8 -------- 2 files changed, 5 insertions(+), 12 deletions(-) diff --git a/src/core/core.helpers.js b/src/core/core.helpers.js index 08fc3a419..2fc62ec2f 100644 --- a/src/core/core.helpers.js +++ b/src/core/core.helpers.js @@ -246,9 +246,10 @@ })(), warn = helpers.warn = function(str) { //Method for warning of errors - if (window.console && typeof window.console.warn === "function") console.warn(str); + if (console && typeof console.warn === "function") { + console.warn(str); + } }, - amd = helpers.amd = (typeof define === 'function' && define.amd), //-- Math methods isNumber = helpers.isNumber = function(n) { return !isNaN(parseFloat(n)) && isFinite(n); @@ -787,11 +788,11 @@ ctx.closePath(); }, color = helpers.color = function(color) { - if (!window.Color) { + if (!root.Color) { console.log('Color.js not found!'); return color; } - return window.Color(color); + return root.Color(color); }, addResizeListener = helpers.addResizeListener = function(node, callback) { // Hide an iframe before the node diff --git a/src/core/core.js b/src/core/core.js index c8687e973..31460f4fe 100755 --- a/src/core/core.js +++ b/src/core/core.js @@ -109,14 +109,6 @@ }, }; - if (typeof amd !== 'undefined') { - define(function() { - return Chart; - }); - } else if (typeof module === 'object' && module.exports) { - module.exports = Chart; - } - root.Chart = Chart; Chart.noConflict = function() {