diff options
author | Ulrich-Matthias Schäfer <ulima.ums@googlemail.com> | 2017-07-10 13:51:06 +0200 |
---|---|---|
committer | Ulrich-Matthias Schäfer <ulima.ums@googlemail.com> | 2017-07-10 13:51:06 +0200 |
commit | bc9bfb6025e826b0ee6c827f1a356995d7f05d4c (patch) | |
tree | 6362deae3c6347b97dc902acdad26e9cb6047946 /src/helpers.js | |
parent | 932969dca9e1ef1090304d6a77ac8dd92a42730f (diff) | |
download | svg.js-bc9bfb6025e826b0ee6c827f1a356995d7f05d4c.tar.gz svg.js-bc9bfb6025e826b0ee6c827f1a356995d7f05d4c.zip |
use `children` instead of `childNodes` (#710), renamed `previous()` to `prev()`
Diffstat (limited to 'src/helpers.js')
-rw-r--r-- | src/helpers.js | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/src/helpers.js b/src/helpers.js index 6a07482..7b58727 100644 --- a/src/helpers.js +++ b/src/helpers.js @@ -149,9 +149,8 @@ function arrayToString(a) { // Deep new id assignment function assignNewId(node) { // do the same for SVG child nodes as well - for (var i = node.childNodes.length - 1; i >= 0; i--) - if (node.childNodes[i] instanceof window.SVGElement) - assignNewId(node.childNodes[i]) + for (var i = node.children.length - 1; i >= 0; i--) + assignNewId(node.children[i]) if(node.id) return SVG.adopt(node).id(SVG.eid(node.nodeName)) |