Skip to content

Commit

Permalink
Fix isEmptyRender for SimpleMemoComponent
Browse files Browse the repository at this point in the history
  • Loading branch information
eps1lon committed Aug 3, 2022
1 parent 9dfd35f commit cc64090
Showing 1 changed file with 3 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -238,7 +238,9 @@ function toTree(vnode) {
};
case FiberTags.MemoSFC: {
let renderedNodes = flatten(nodeAndSiblingsArray(node.child).map(toTree));
if (renderedNodes.length === 0) {
if (node.child === null) {
renderedNodes = [null];
} else if (renderedNodes.length === 0) {
renderedNodes = [node.memoizedProps.children];
}
return {
Expand Down

0 comments on commit cc64090

Please sign in to comment.