aboutsummaryrefslogtreecommitdiffstats
path: root/src/utils
diff options
context:
space:
mode:
Diffstat (limited to 'src/utils')
-rw-r--r--src/utils/adopter.js6
1 files changed, 1 insertions, 5 deletions
diff --git a/src/utils/adopter.js b/src/utils/adopter.js
index 6d055ed..487115c 100644
--- a/src/utils/adopter.js
+++ b/src/utils/adopter.js
@@ -41,12 +41,8 @@ export function makeInstance (element, isHTML = false) {
return element
}
-// export function nodeOrNew (name, node) {
-// return node instanceof globals.window.Node ? node : create(name)
-// }
export function nodeOrNew (name, node) {
- //console.log(node)
- return (node && 'ownerDocument' in node && node instanceof node.ownerDocument.defaultView.Node) ? node : create(name)
+ return (node && node.ownerDocument && node instanceof node.ownerDocument.defaultView.Node) ? node : create(name)
}
// Adopt existing svg elements