React inlining: Make sure some props object always exists

This commit is contained in:
Ben Alpert
2015-11-11 15:33:43 -08:00
parent 07a5bcc04a
commit e8ebc7074e
6 changed files with 6 additions and 6 deletions

View File

@@ -67,7 +67,7 @@ export default function ({ types: t }) {
if (props.properties.length) {
props = t.callExpression(file.addHelper("defaultProps"), [defProps, props]);
} else {
props = defProps;
props = t.logicalExpression("||", defProps, props);
}
}