]> git.ipfire.org Git - thirdparty/Chart.js.git/commitdiff
Remove old and stuff. Use the correct color variable instead of window.color 1736/head
authoretimberg <evert.timberg@gmail.com>
Thu, 3 Dec 2015 03:15:03 +0000 (22:15 -0500)
committeretimberg <evert.timberg@gmail.com>
Thu, 3 Dec 2015 03:15:03 +0000 (22:15 -0500)
src/core/core.helpers.js
src/core/core.js

index 08fc3a419053b4bb1e6c29cad1a1da72c2e87849..2fc62ec2fae441db8896191ff28ee1d04217571d 100644 (file)
                })(),
                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);
                        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
index c8687e973db3a039b1a23aea1e0c5f2b69900164..31460f4feec31a6ce2c253803ce3916f63db5073 100755 (executable)
                },
        };
 
-       if (typeof amd !== 'undefined') {
-               define(function() {
-                       return Chart;
-               });
-       } else if (typeof module === 'object' && module.exports) {
-               module.exports = Chart;
-       }
-
        root.Chart = Chart;
 
        Chart.noConflict = function() {