diff options
author | Ulrich-Matthias Schäfer <ulima.ums@googlemail.com> | 2015-12-23 19:06:46 +0100 |
---|---|---|
committer | Ulrich-Matthias Schäfer <ulima.ums@googlemail.com> | 2015-12-23 19:06:46 +0100 |
commit | 2b97c7e4199427fd7cca5928cf68945bd388df7e (patch) | |
tree | 6e50a3419c825be9c88697ddedde5c55a69c8f89 /src/svg.js | |
parent | 13587eaf3cac41ddf4dc527fe0898793a00173d8 (diff) | |
download | svg.js-2b97c7e4199427fd7cca5928cf68945bd388df7e.tar.gz svg.js-2b97c7e4199427fd7cca5928cf68945bd388df7e.zip |
added check for existence of node (fix #431)
Diffstat (limited to 'src/svg.js')
-rw-r--r-- | src/svg.js | 3 |
1 files changed, 3 insertions, 0 deletions
@@ -90,6 +90,9 @@ SVG.invent = function(config) { // Adopt existing svg elements SVG.adopt = function(node) { + // check for presence of node + if (!node) return null + // make sure a node isn't already adopted if (node.instance) return node.instance |