summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorUlrich-Matthias Schäfer <ulima.ums@googlemail.com>2017-07-25 14:52:13 +0200
committerUlrich-Matthias Schäfer <ulima.ums@googlemail.com>2017-07-25 14:52:13 +0200
commitecea84ea3ae7f9986144c4fbd70994cfb9925654 (patch)
treebb8ec7b35830f027355c02381cef444b2e9b0a87 /src
parentee0b340bfeb2430767d4a2850413f864c42e5405 (diff)
downloadsvg.js-ecea84ea3ae7f9986144c4fbd70994cfb9925654.tar.gz
svg.js-ecea84ea3ae7f9986144c4fbd70994cfb9925654.zip
fix bug where defs returns nothing
Diffstat (limited to 'src')
-rw-r--r--src/doc.js2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/doc.js b/src/doc.js
index d5bc30e..7cdd6be 100644
--- a/src/doc.js
+++ b/src/doc.js
@@ -21,7 +21,7 @@ SVG.Doc = SVG.invent({
}
// Creates and returns defs element
, defs: function() {
- return (this.node.getElementsByTagName('defs')[0] || this.put(new SVG.Defs).node).instance
+ return SVG.adopt(this.node.getElementsByTagName('defs')[0]) || this.put(new SVG.Defs())
}
// custom parent method
, parent: function() {