mirror of
https://github.com/Hopiu/fabric.js.git
synced 2026-03-16 22:10:32 +00:00
Merge pull request #1913 from physiocoder/master
Make sure 'fabric' is always global
This commit is contained in:
commit
a64a475099
1 changed files with 2 additions and 0 deletions
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Reference in a new issue