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 /dist/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 'dist/svg.js')
-rw-r--r-- | dist/svg.js | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/dist/svg.js b/dist/svg.js index 16bffe3..1f8d3bc 100644 --- a/dist/svg.js +++ b/dist/svg.js @@ -6,7 +6,7 @@ * @copyright Wout Fierens <wout@impinc.co.uk> * @license MIT * -* BUILT: Sat Dec 12 2015 00:53:00 GMT+0100 (Mitteleuropäische Zeit) +* BUILT: Wed Dec 23 2015 19:05:43 GMT+0100 (Mitteleuropäische Zeit) */; (function(root, factory) { if (typeof define === 'function' && define.amd) { @@ -112,6 +112,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 |