diff options
author | Ulrich-Matthias Schäfer <ulima.ums@googlemail.com> | 2018-02-12 13:49:38 +0100 |
---|---|---|
committer | Ulrich-Matthias Schäfer <ulima.ums@googlemail.com> | 2018-03-01 02:08:58 +0100 |
commit | 981c1fb154e3999f91dd9c1eff97726d689240ff (patch) | |
tree | 2a71af12854deefdb88a9a27f5f46286128eabb3 | |
parent | 64a5c17b95393c0914670b1b9e2c8b4d63707968 (diff) | |
download | svg.js-981c1fb154e3999f91dd9c1eff97726d689240ff.tar.gz svg.js-981c1fb154e3999f91dd9c1eff97726d689240ff.zip |
return explicit null if there is no root
-rw-r--r-- | src/doc.js | 4 |
1 files changed, 3 insertions, 1 deletions
@@ -23,7 +23,9 @@ SVG.Doc = SVG.invent({ if(parent.isRoot()) return parent } - throw new Error('This should never be reached') + // this can only happen when you have something like + // <g><svg>...</svg></g> + return null }, // Add namespaces namespace: function() { |