diff options
Diffstat (limited to 'src/elements/Bare.js')
-rw-r--r-- | src/elements/Bare.js | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/elements/Bare.js b/src/elements/Bare.js index 6264ae2..9415cd4 100644 --- a/src/elements/Bare.js +++ b/src/elements/Bare.js @@ -1,4 +1,4 @@ -import { nodeOrNew, register } from '../utils/adopter.js' +import { nodeOrNew, register, wrapWithAttrCheck } from '../utils/adopter.js' import { registerMethods } from '../utils/methods.js' import Container from './Container.js' @@ -24,7 +24,7 @@ register(Bare) registerMethods('Container', { // Create an element that is not described by SVG.js - element (node, inherit) { - return this.put(new Bare(node, inherit)) - } + element: wrapWithAttrCheck(function (node) { + return this.put(new Bare(node)) + }) }) |