We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent fa53e89 commit ae451b7Copy full SHA for ae451b7
components/_util/props-util/index.js
@@ -361,8 +361,8 @@ export function filterEmpty(children = []) {
361
children.forEach(child => {
362
if (Array.isArray(child)) {
363
res.push(...child);
364
- } else if (child.type === Fragment) {
365
- res.push(...child.children);
+ } else if (child?.type === Fragment) {
+ res.push(...filterEmpty(child.children));
366
} else {
367
res.push(child);
368
}
0 commit comments