aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorUlrich-Matthias Schäfer <ulima.ums@googlemail.com>2021-09-23 13:58:25 +0200
committerGitHub <noreply@github.com>2021-09-23 13:58:25 +0200
commit239a854014f3473c8c802ce95d9f9e3e6232ad2e (patch)
treef5a87b7ffcea17ef3d1dffd9f5425e881f8f885a
parentfce00da59191866317fbb61c51d7afca2d768906 (diff)
parent4c415a20af17c55c6d8848c50f719aa7a80d4e4e (diff)
downloadsvg.js-239a854014f3473c8c802ce95d9f9e3e6232ad2e.tar.gz
svg.js-239a854014f3473c8c802ce95d9f9e3e6232ad2e.zip
Merge pull request #1219 from visionm45/master
node or new
-rw-r--r--src/utils/adopter.js2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/utils/adopter.js b/src/utils/adopter.js
index 048eb9c..487115c 100644
--- a/src/utils/adopter.js
+++ b/src/utils/adopter.js
@@ -42,7 +42,7 @@ export function makeInstance (element, isHTML = false) {
}
export function nodeOrNew (name, node) {
- return node instanceof globals.window.Node ? node : create(name)
+ return (node && node.ownerDocument && node instanceof node.ownerDocument.defaultView.Node) ? node : create(name)
}
// Adopt existing svg elements