From f0e49170a47f039a6cfc2638d0670896f6787a2f Mon Sep 17 00:00:00 2001 From: Jovi De Croock Date: Wed, 24 Jul 2024 21:15:47 +0200 Subject: [PATCH] Fix issue in testing libraries where there might not be a DOM node (#4454) --- 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..a5b660a9ac 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 '';