From: Daniel Date: Wed, 22 Sep 2021 22:46:41 +0000 (-0500) Subject: this time for real revert package lock X-Git-Tag: 3.1.2~7^2 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=4c415a20af17c55c6d8848c50f719aa7a80d4e4e;p=svg.js.git this time for real revert package lock --- 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