aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-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