Fix react-inline-elements bug (#5958)
This commit is contained in:
committed by
Henry Zhu
parent
e919c6e6eb
commit
9d612e717e
@@ -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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user