From: Esa-Matti Suuronen Date: Sat, 13 Apr 2013 08:55:36 +0000 (+0300) Subject: Explicit global definition X-Git-Tag: v0.2.0~6^2 X-Git-Url: http://git.ipfire.org/gitweb/?a=commitdiff_plain;h=refs%2Fpull%2F75%2Fhead;p=thirdparty%2FChart.js.git Explicit global definition Some script bundlers such as Browserify compile a wrapper function over the modules. If var-statement is used to define the global it will be hidden inside it. Use window-global to define Chart global explicitly. --- diff --git a/Chart.js b/Chart.js index a2141a056..ffbe16f37 100755 --- a/Chart.js +++ b/Chart.js @@ -8,7 +8,7 @@ */ //Define the global Chart Variable as a class. -var Chart = function(context){ +window.Chart = function(context){ var chart = this;