Fix react-inline-elements bug (#5958)

This commit is contained in:
Justin Ridgewell
2017-07-17 10:46:13 -04:00
committed by Henry Zhu
parent e919c6e6eb
commit 9d612e717e

View File

@@ -16,7 +16,7 @@ export default function({ types: t }) {
function getAttributeValue(attr) {
let value = attr.value;
if (!value) return t.identifier("true");
if (!value) return t.booleanLiteral(true);
if (t.isJSXExpressionContainer(value)) value = value.expression;
return value;
}