From: Daniel Date: Wed, 22 Sep 2021 22:45:12 +0000 (-0500) Subject: Revert "remove old code" X-Git-Tag: 3.1.2~7^2~1 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=35c127256dbcd65452cf6ecd9ed63ac9daec724a;p=svg.js.git Revert "remove old code" This reverts commit aeea23be44bb6dc1653837c61c82a404d4701c8b. --- diff --git a/src/utils/adopter.js b/src/utils/adopter.js index b5e326c..6d055ed 100644 --- a/src/utils/adopter.js +++ b/src/utils/adopter.js @@ -45,7 +45,8 @@ export function makeInstance (element, isHTML = false) { // return node instanceof globals.window.Node ? node : create(name) // } export function nodeOrNew (name, node) { - return (node && node.ownerDocument && node instanceof node.ownerDocument.defaultView.Node) ? node : create(name) + //console.log(node) + return (node && 'ownerDocument' in node && node instanceof node.ownerDocument.defaultView.Node) ? node : create(name) } // Adopt existing svg elements