summaryrefslogtreecommitdiffstats
path: root/src/svg.js
diff options
context:
space:
mode:
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