summaryrefslogtreecommitdiffstats
path: root/src/svg.js
diff options
context:
space:
mode:
authorUlrich-Matthias Schäfer <ulima.ums@googlemail.com>2015-12-23 19:06:46 +0100
committerUlrich-Matthias Schäfer <ulima.ums@googlemail.com>2015-12-23 19:06:46 +0100
commit2b97c7e4199427fd7cca5928cf68945bd388df7e (patch)
tree6e50a3419c825be9c88697ddedde5c55a69c8f89 /src/svg.js
parent13587eaf3cac41ddf4dc527fe0898793a00173d8 (diff)
downloadsvg.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.js3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/svg.js b/src/svg.js
index ebe298c..c69aebc 100644
--- a/src/svg.js
+++ b/src/svg.js
@@ -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