summaryrefslogtreecommitdiffstats
path: root/src/elements/Doc.js
diff options
context:
space:
mode:
Diffstat (limited to 'src/elements/Doc.js')
-rw-r--r--src/elements/Doc.js11
1 files changed, 8 insertions, 3 deletions
diff --git a/src/elements/Doc.js b/src/elements/Doc.js
index 2132491..0d862ba 100644
--- a/src/elements/Doc.js
+++ b/src/elements/Doc.js
@@ -1,4 +1,9 @@
-import { adopt, nodeOrNew, register } from '../utils/adopter.js'
+import {
+ adopt,
+ nodeOrNew,
+ register,
+ wrapWithAttrCheck
+} from '../utils/adopter.js'
import { ns, svgjs, xlink, xmlns } from '../modules/core/namespaces.js'
import { registerMethods } from '../utils/methods.js'
import Container from './Container.js'
@@ -63,9 +68,9 @@ export default class Doc extends Container {
registerMethods({
Container: {
// Create nested svg document
- nested () {
+ nested: wrapWithAttrCheck(function () {
return this.put(new Doc())
- }
+ })
}
})