From ecea84ea3ae7f9986144c4fbd70994cfb9925654 Mon Sep 17 00:00:00 2001 From: Ulrich-Matthias Schäfer Date: Tue, 25 Jul 2017 14:52:13 +0200 Subject: fix bug where defs returns nothing --- src/doc.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src') 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() { -- cgit v1.2.3