From: Daniel Date: Wed, 22 Sep 2021 22:41:46 +0000 (-0500) Subject: reverted package lock and edit nodeOrNew X-Git-Tag: 3.1.2~7^2~3 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=8e7c12b42cd91f21ff18fb3786f2782003743ed3;p=svg.js.git reverted package lock and edit nodeOrNew --- diff --git a/src/utils/adopter.js b/src/utils/adopter.js index 300c133..487115c 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 && '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