Merge branch 'master' of github.com:babel/babel
This commit is contained in:
commit
64903d0dcf
@ -49,7 +49,9 @@ export var visitor = {
|
|||||||
pushElemProp("ref", t.literal(null));
|
pushElemProp("ref", t.literal(null));
|
||||||
|
|
||||||
if (node.children.length) {
|
if (node.children.length) {
|
||||||
pushProp(props.properties, t.identifier("children"), t.arrayExpression(react.buildChildren(node)));
|
var children = react.buildChildren(node);
|
||||||
|
children = children.length === 1 ? children[0] : t.arrayExpression(children);
|
||||||
|
pushProp(props.properties, t.identifier("children"), children);
|
||||||
}
|
}
|
||||||
|
|
||||||
// props
|
// props
|
||||||
|
|||||||
@ -16,11 +16,11 @@ function render() {
|
|||||||
type: "foo",
|
type: "foo",
|
||||||
ref: null,
|
ref: null,
|
||||||
props: {
|
props: {
|
||||||
children: [text]
|
children: text
|
||||||
},
|
},
|
||||||
key: null
|
key: null
|
||||||
};
|
};
|
||||||
return function () {
|
return function () {
|
||||||
return _ref2;
|
return _ref2;
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|||||||
@ -4,7 +4,7 @@
|
|||||||
type: "div",
|
type: "div",
|
||||||
ref: null,
|
ref: null,
|
||||||
props: {
|
props: {
|
||||||
children: [bar],
|
children: bar,
|
||||||
className: "foo"
|
className: "foo"
|
||||||
},
|
},
|
||||||
key: null
|
key: null
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user