Skip to content

Commit

Permalink
Fix issue in testing libraries where there might not be a DOM node (#…
Browse files Browse the repository at this point in the history
  • Loading branch information
JoviDeCroock authored Jul 24, 2024
1 parent 2f1712a commit f0e4917
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions debug/src/debug.js
Original file line number Diff line number Diff line change
Expand Up @@ -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 '';
Expand Down

0 comments on commit f0e4917

Please sign in to comment.