validate: allow JSXText node in JSXElement children property (fixes T6876)

This commit is contained in:
Henry Zhu
2015-12-22 09:35:14 -05:00
parent fd3aad5811
commit aa2cc907ea

View File

@@ -41,7 +41,7 @@ defineType("JSXElement", {
children: {
validate: chain(
assertValueType("array"),
assertEach(assertNodeType("StringLiteral", "JSXExpressionContainer", "JSXElement"))
assertEach(assertNodeType("StringLiteral", "JSXText", "JSXExpressionContainer", "JSXElement"))
)
}
}