Merge pull request #1913 from physiocoder/master

Make sure 'fabric' is always global
This commit is contained in:
Juriy Zaytsev 2015-01-02 19:13:11 +01:00
commit a64a475099

View file

@ -8,6 +8,8 @@ if (typeof exports !== 'undefined') {
if (typeof document !== 'undefined' && typeof window !== 'undefined') {
fabric.document = document;
fabric.window = window;
// ensure globality even if entire library were function wrapped (as in Meteor.js packaging system)
window.fabric = fabric;
}
else {
// assume we're running under node.js when document/window are not present