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, 2 insertions, 1 deletions
diff --git a/src/svg.js b/src/svg.js
index 9b3bfd6..2ec5908 100644
--- a/src/svg.js
+++ b/src/svg.js
@@ -52,12 +52,13 @@ SVG.invent = function (config) {
// Create element initializer
var initializer = typeof config.create === 'function' ? config.create
: function (node) {
- this.constructor(node || SVG.create(config.create))
+ SVG.Element.call(this, node || SVG.create(config.create))
}
// Inherit prototype
if (config.inherit) {
initializer.prototype = new config.inherit()
+ initializer.prototype.constructor = initializer
}
// Extend with methods