summaryrefslogtreecommitdiffstats
path: root/src/svg.js
diff options
context:
space:
mode:
authorUlrich-Matthias Schäfer <ulima.ums@googlemail.com>2017-04-24 22:49:29 +0200
committerUlrich-Matthias Schäfer <ulima.ums@googlemail.com>2017-04-25 15:10:09 +0200
commit5816fdb903476762394d6c52d15e5bc38e135bfd (patch)
tree70d1f2d1b8a5512f04789807dd7abba54060d209 /src/svg.js
parentac3b9941c72a2e66bf113b2f652fcadfa24cc6de (diff)
downloadsvg.js-5816fdb903476762394d6c52d15e5bc38e135bfd.tar.gz
svg.js-5816fdb903476762394d6c52d15e5bc38e135bfd.zip
`SVG.extend` now expects exactly one module or an array of modules
Conflicts: dist/svg.js dist/svg.min.js
Diffstat (limited to 'src/svg.js')
-rw-r--r--src/svg.js10
1 files changed, 3 insertions, 7 deletions
diff --git a/src/svg.js b/src/svg.js
index 043e245..5b4f0bd 100644
--- a/src/svg.js
+++ b/src/svg.js
@@ -40,14 +40,10 @@ SVG.create = function(name) {
}
// Method for extending objects
-SVG.extend = function() {
- var modules, methods, key, i
+SVG.extend = function(modules, methods) {
+ var key, i
- // Get list of modules
- modules = [].slice.call(arguments)
-
- // Get object with extensions
- methods = modules.pop()
+ modules = Array.isArray(modules) ? modules : [modules]
for (i = modules.length - 1; i >= 0; i--)
if (modules[i])