diff options
author | Ulrich-Matthias Schäfer <ulima.ums@googlemail.com> | 2017-04-24 22:49:29 +0200 |
---|---|---|
committer | Ulrich-Matthias Schäfer <ulima.ums@googlemail.com> | 2017-04-25 15:10:09 +0200 |
commit | 5816fdb903476762394d6c52d15e5bc38e135bfd (patch) | |
tree | 70d1f2d1b8a5512f04789807dd7abba54060d209 /src/svg.js | |
parent | ac3b9941c72a2e66bf113b2f652fcadfa24cc6de (diff) | |
download | svg.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.js | 10 |
1 files changed, 3 insertions, 7 deletions
@@ -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]) |