fix react inline elements plugin when creating properties out of jsx expression containers - fixes #2766

This commit is contained in:
Sebastian McKenzie
2015-11-03 03:34:46 +00:00
parent c1cceef128
commit 91c463c0f7
3 changed files with 20 additions and 0 deletions

View File

@@ -38,6 +38,7 @@ export default function ({ types: t }) {
}
function pushProp(objProps, key, value) {
if (t.isJSXExpressionContainer(value)) value = value.expression;
objProps.push(t.objectProperty(key, value));
}