diff --git a/src/utils/adopter.js b/src/utils/adopter.js index 048eb9c8..487115c9 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