From 2b39ea808233dc97aec6135738c3c06b7587c1e5 Mon Sep 17 00:00:00 2001 From: Jovi De Croock Date: Wed, 24 Jul 2024 20:33:16 +0200 Subject: [PATCH 1/2] Fix issue in testing libraries where there might not be a DOM node --- debug/src/debug.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/debug/src/debug.js b/debug/src/debug.js index e51719e7c8..9d61d33caa 100644 --- a/debug/src/debug.js +++ b/debug/src/debug.js @@ -42,8 +42,8 @@ function getDomChildren(vnode) { function getClosestDomNodeParentName(parent) { if (!parent) return ''; if (typeof parent.type == 'function') { - if (parent._parent === null) { - if (parent._dom !== null && parent._dom.parentNode !== null) { + if (parent._parent == null) { + if (parent._dom != null && parent._dom.parentNode !== null) { return parent._dom.parentNode.localName; } return ''; From 5ea0e2154aa566debbc9349bf94b1496e3ab8fa6 Mon Sep 17 00:00:00 2001 From: Jovi De Croock Date: Wed, 24 Jul 2024 21:11:30 +0200 Subject: [PATCH 2/2] Update debug/src/debug.js Co-authored-by: Marvin Hagemeister --- debug/src/debug.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/debug/src/debug.js b/debug/src/debug.js index 9d61d33caa..a5b660a9ac 100644 --- a/debug/src/debug.js +++ b/debug/src/debug.js @@ -43,7 +43,7 @@ function getClosestDomNodeParentName(parent) { if (!parent) return ''; if (typeof parent.type == 'function') { if (parent._parent == null) { - if (parent._dom != null && parent._dom.parentNode !== null) { + if (parent._dom != null && parent._dom.parentNode != null) { return parent._dom.parentNode.localName; } return '';