Skip to content

Commit

Permalink
avoid crashing when there is no _children (#4147)
Browse files Browse the repository at this point in the history
  • Loading branch information
JoviDeCroock authored Oct 1, 2023
1 parent 08b07cc commit c5861ab
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions debug/src/debug.js
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,8 @@ const isWeakMapSupported = typeof WeakMap == 'function';
function getDomChildren(vnode) {
let domChildren = [];

if (!vnode._children) return domChildren;

vnode._children.forEach(child => {
if (child && typeof child.type === 'function') {
domChildren.push.apply(domChildren, getDomChildren(child));
Expand Down

0 comments on commit c5861ab

Please sign in to comment.