diff options
author | Ulrich-Matthias Schäfer <ulima.ums@googlemail.com> | 2015-11-30 22:43:23 +0100 |
---|---|---|
committer | Ulrich-Matthias Schäfer <ulima.ums@googlemail.com> | 2015-11-30 22:43:23 +0100 |
commit | 03c7554cc4bf3404ec51383cfdeeb64d481b7c42 (patch) | |
tree | e4defb242529a457c1f82f765e23a0c7466904ee /src | |
parent | dd2ad7824d546242468992436d9a631a60294e28 (diff) | |
download | svg.js-03c7554cc4bf3404ec51383cfdeeb64d481b7c42.tar.gz svg.js-03c7554cc4bf3404ec51383cfdeeb64d481b7c42.zip |
fix amd loader (see #412)
Diffstat (limited to 'src')
-rw-r--r-- | src/umd.js | 8 |
1 files changed, 5 insertions, 3 deletions
@@ -1,10 +1,12 @@ (function(root, factory) { if (typeof define === 'function' && define.amd) { - define(factory); + define(function(){ + return factory(root, root.document) + }) } else if (typeof exports === 'object') { - module.exports = root.document ? factory(root, root.document) : function(w){ return factory(w, w.document) }; + module.exports = root.document ? factory(root, root.document) : function(w){ return factory(w, w.document) } } else { - root.SVG = factory(root, root.document); + root.SVG = factory(root, root.document) } }(typeof window !== "undefined" ? window : this, function(window, document) { |