properly handle shorthand JSX attributes in optimisation.react.inlineElements transformer - fixes #1309

This commit is contained in:
Sebastian McKenzie
2015-04-21 16:14:36 +01:00
parent b6498103db
commit f6278e43ce
3 changed files with 12 additions and 1 deletions

View File

@@ -57,7 +57,7 @@ export function JSXElement(node, parent, scope, file) {
if (isJSXAttributeOfName(attr, "key")) {
key = attr.value;
} else {
pushProp(props.properties, attr.name, attr.value);
pushProp(props.properties, attr.name, attr.value || t.identifier("true"));
}
}