Small cleanup refactor

This commit is contained in:
Jordan Eldredge 2019-09-03 07:29:31 -07:00
parent 25cc7fc959
commit 458fb426c9

View file

@ -511,11 +511,12 @@ function DummyComponent({ node }) {
}
function XmlChildren({ node }) {
const childNodes = node.children || [];
const children = childNodes.map((childNode, i) => (
if (node.children == null) {
return null;
}
return node.children.map((childNode, i) => (
<XmlNode key={i} node={childNode} {...childNode.attributes} />
));
return children;
}
// Given a skin XML node, pick which component to use, and render it.