Make sure fabric is always global

Later code assumes fabric is a gloabl symbol
This commit is contained in:
Roberto Ferro 2014-12-29 17:52:15 +01:00
parent ab66f7d4f5
commit 219980d046

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
window.fabric = fabric;
}
else {
// assume we're running under node.js when document/window are not present