aboutsummaryrefslogtreecommitdiffstats
path: root/src/utils/adopter.js
diff options
context:
space:
mode:
Diffstat (limited to 'src/utils/adopter.js')
-rw-r--r--src/utils/adopter.js5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/utils/adopter.js b/src/utils/adopter.js
index 48814ec..962412f 100644
--- a/src/utils/adopter.js
+++ b/src/utils/adopter.js
@@ -43,8 +43,9 @@ export function makeInstance(element, isHTML = false) {
export function nodeOrNew(name, node) {
return node &&
- node.ownerDocument &&
- node instanceof node.ownerDocument.defaultView.Node
+ (node instanceof globals.window.Node ||
+ (node.ownerDocument &&
+ node instanceof node.ownerDocument.defaultView.Node))
? node
: create(name)
}