Make sure fabric is always global

Later code assumes fabric is a global symbol and this fails when library is function wrapped as in Meteor.js packaging system.
This commit is contained in:
Roberto Ferro 2014-12-31 12:32:32 +01:00
parent 219980d046
commit d2b435da16

View file

@ -8,7 +8,7 @@ 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
// ensure globality even if entire library were function wrapped (as in Meteor.js packaging system)
window.fabric = fabric;
}
else {