Chart.plugins.register(plugins);
-window.Chart = module.exports = Chart;
+module.exports = Chart;
+if (typeof window !== 'undefined') {
+ window.Chart = Chart;
+}
};
// Request animation polyfill - http://www.paulirish.com/2011/requestanimationframe-for-smart-animating/
helpers.requestAnimFrame = (function() {
+ if (typeof window === 'undefined') {
+ return function(callback) {
+ callback();
+ };
+ }
return window.requestAnimationFrame ||
window.webkitRequestAnimationFrame ||
window.mozRequestAnimationFrame ||