aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorUlrich-Matthias Schäfer <ulima.ums@googlemail.com>2015-11-30 22:43:23 +0100
committerUlrich-Matthias Schäfer <ulima.ums@googlemail.com>2015-11-30 22:43:23 +0100
commit03c7554cc4bf3404ec51383cfdeeb64d481b7c42 (patch)
treee4defb242529a457c1f82f765e23a0c7466904ee /src
parentdd2ad7824d546242468992436d9a631a60294e28 (diff)
downloadsvg.js-03c7554cc4bf3404ec51383cfdeeb64d481b7c42.tar.gz
svg.js-03c7554cc4bf3404ec51383cfdeeb64d481b7c42.zip
fix amd loader (see #412)
Diffstat (limited to 'src')
-rw-r--r--src/umd.js8
1 files changed, 5 insertions, 3 deletions
diff --git a/src/umd.js b/src/umd.js
index 60b5785..3ef3ab9 100644
--- a/src/umd.js
+++ b/src/umd.js
@@ -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) {