File tree Expand file tree Collapse file tree 1 file changed +2
-2
lines changed Expand file tree Collapse file tree 1 file changed +2
-2
lines changed Original file line number Diff line number Diff line change @@ -206,7 +206,7 @@ pub const Node = struct {
206206 // the parent's ownerDocument.
207207 // This process is known as adoption.
208208 // (7.1) https://dom.spec.whatwg.org/#concept-node-insert
209- if (child_owner == null or (child_owner .? != self_owner .? )) {
209+ if (child_owner == null or (self_owner != null and child_owner .? != self_owner .? )) {
210210 const w = Walker {};
211211 var current = child ;
212212 while (true ) {
@@ -319,7 +319,7 @@ pub const Node = struct {
319319 // the parent's ownerDocument.
320320 // This process is known as adoption.
321321 // (7.1) https://dom.spec.whatwg.org/#concept-node-insert
322- if (new_node_owner == null or (new_node_owner .? != self_owner .? )) {
322+ if (new_node_owner == null or (self_owner != null and new_node_owner .? != self_owner .? )) {
323323 const w = Walker {};
324324 var current = new_node ;
325325 while (true ) {
You can’t perform that action at this time.
0 commit comments