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 05ad92c commit 5c2ac50Copy full SHA for 5c2ac50
src/core/modules/component/$jsx.js
@@ -3,10 +3,16 @@ import { flattenArray } from '../../shared/utils';
3
const ignoreChildren = [false, null, '', undefined];
4
5
const $jsx = (type, props, ...children) => {
6
+ const flatChildren = flattenArray(
7
+ (children || []).filter((child) => ignoreChildren.indexOf(child) < 0),
8
+ );
9
+ if (type === 'Fragment') {
10
+ return flatChildren;
11
+ }
12
return {
13
type,
14
props: props || {},
- children: flattenArray((children || []).filter((child) => ignoreChildren.indexOf(child) < 0)),
15
+ children: flatChildren,
16
};
17
18
0 commit comments